developerzohaib786 opened a new pull request, #36197:
URL: https://github.com/apache/superset/pull/36197

   ### SUMMARY
   Fixes #33905 
   
   This PR resolves an issue where the last month's label doesn't appear on the 
X-axis for Time Series Line Charts with monthly time grain.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!-- If you can, please provide before/after screenshots showing the label 
now appearing -->
   
   ### DESCRIPTION OF CHANGE
   The issue was caused by the `hideOverlap: true` setting in the x-axis label 
configuration, which prevented the final label from displaying when ECharts 
detected potential overlap.
   
   **Changes made:**
   1. **Updated** 
`superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts`
      - Modified `axisLabel.hideOverlap` logic to set `false` for time-based 
axes (AxisType.Time)
      - Set `true` for categorical/value axes to maintain overlap prevention 
for non-time axes
   
   2. **Added** tests in 
`superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts`
      - Test verifying `hideOverlap: false` for time-based x-axis
      - Test verifying `hideOverlap: true` for categorical x-axis (when 
`xAxisForceCategorical` is enabled)
   
   ### TESTING INSTRUCTIONS
   1. Create a Time Series Line Chart using example datasets
   2. Set time grain to "month"
   3. Verify that the last month's label now appears on the X-axis
   4. Test with different time grains (day, week, quarter, year) to ensure 
labels display correctly
   5. Test with categorical axis to ensure overlap prevention still works
   
   ### CHECKLIST
   - [ ] Has associated issue: #33905
   - [ ] Required feature flags:
   - [ ] Change will be tested in Cypress tests
   - [ ] Code follows style guidelines
   - [ ] Tests pass locally with my changes
   - [ ] Added tests that prove my fix is effective or that my feature works
   - [ ] New and existing unit tests pass locally with my changes
   - [ ] Extended the README / documentation, if necessary
   - [ ] Added an entry to UPDATING.md for any breaking changes or significant 
updates
   
   ### ADDITIONAL NOTES
   This fix specifically targets time-based axes where showing all temporal 
labels (including the last one) is important for data interpretation. For 
categorical and value axes, overlap prevention remains enabled to maintain 
readability.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to