-
Notifications
You must be signed in to change notification settings - Fork 16.5k
fix(timeseries): x-axis last month was hidden #37181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix(timeseries): x-axis last month was hidden #37181
Conversation
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review Agent Run #d52268
Actionable Suggestions - 1
-
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts - 1
- Test setup incomplete for temporal axis · Line 198-239
Review Details
-
Files reviewed - 2 · Commit Range:
dc149f2..dc149f2- superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
- superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- Eslint (Linter) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.
Documentation & Help
| test('should configure time axis labels to show max label for last month visibility', () => { | ||
| const formData = { | ||
| colorScheme: 'bnbColors', | ||
| datasource: '3__table', | ||
| granularity_sqla: 'ds', | ||
| metric: 'sum__num', | ||
| viz_type: 'my_viz', | ||
| }; | ||
| const queriesData = [ | ||
| { | ||
| data: [ | ||
| { sum__num: 100, __timestamp: new Date('2026-01-01').getTime() }, | ||
| { sum__num: 200, __timestamp: new Date('2026-02-01').getTime() }, | ||
| { sum__num: 300, __timestamp: new Date('2026-03-01').getTime() }, | ||
| { sum__num: 400, __timestamp: new Date('2026-04-01').getTime() }, | ||
| { sum__num: 500, __timestamp: new Date('2026-05-01').getTime() }, | ||
| ], | ||
| colnames: ['sum__num', '__timestamp'], | ||
| coltypes: [GenericDataType.Numeric, GenericDataType.Temporal], | ||
| }, | ||
| ]; | ||
| const chartProps = new ChartProps({ | ||
| formData, | ||
| width: 800, | ||
| height: 600, | ||
| queriesData, | ||
| theme: supersetTheme, | ||
| }); | ||
|
|
||
| const result = transformProps( | ||
| chartProps as unknown as EchartsTimeseriesChartProps, | ||
| ); | ||
|
|
||
| expect(result.echartOptions.xAxis).toEqual( | ||
| expect.objectContaining({ | ||
| axisLabel: expect.objectContaining({ | ||
| showMaxLabel: true, | ||
| alignMaxLabel: 'right', | ||
| }), | ||
| }), | ||
| ); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add xAxis: '__timestamp' to the formData object to ensure the axis is treated as time-based without removing viz_type.
Code Review Run #d52268
Should Bito avoid suggestions like this for future reviews? (Manage Rules)
- Yes, avoid them
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
SUMMARY
Last month on the right on x-axis timeseries was not appearing.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE
AFTER
TESTING INSTRUCTIONS
For ease, you can use this data in SQLLab
ADDITIONAL INFORMATION