Skip to content

Conversation

@LuisSanchez
Copy link
Contributor

SUMMARY

Last month on the right on x-axis timeseries was not appearing.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE

image

AFTER

image

TESTING INSTRUCTIONS

  1. Create a new chart timeline chart.
  2. Use month granularity.
  3. Check for last month.

For ease, you can use this data in SQLLab

SELECT
  *
FROM (VALUES
  (CAST('2026-01-01' AS DATE), 21000),
  (CAST('2026-02-01' AS DATE), 22000),
  (CAST('2026-03-01' AS DATE), 23000),
  (CAST('2026-04-01' AS DATE), 24000),
  (CAST('2026-05-01' AS DATE), 25000)) AS t(date, value1)

ADDITIONAL INFORMATION

  • Has associated issue: 89307 and 33905
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codeant-ai-for-open-source
Copy link
Contributor

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 ·
Reddit ·
LinkedIn

@LuisSanchez LuisSanchez changed the title fix(timeseries): x-axis last month were hidden fix(timeseries): x-axis last month was hidden Jan 15, 2026
@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI finished reviewing your PR.

Copy link
Contributor

@bito-code-review bito-code-review bot left a 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
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

AI Code Review powered by Bito Logo

Comment on lines +198 to +239
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',
}),
}),
);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test setup incomplete for temporal axis

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

@netlify
Copy link

netlify bot commented Jan 15, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit dc149f2
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6969656f051ff70008384be4
😎 Deploy Preview https://deploy-preview-37181--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant