Skip to content

fix(explore): show the beginning date on time-series x-axis line charts - #42046

Merged
rusackas merged 2 commits into
apache:masterfrom
jesperct:fix/xaxis-beginning-date-missing
Jul 24, 2026
Merged

rusackas merged 2 commits into
apache:masterfrom
jesperct:fix/xaxis-beginning-date-missing

Conversation

@jesperct

Copy link
Copy Markdown
Contributor

SUMMARY

On a time-based x-axis, line/bar/area charts only forced the trailing boundary label to stay visible (showMaxLabel). When the first data point falls between ECharts' auto-generated "nice" ticks (for example a mid-year month at Month grain), the axis-min date got no label at all, so the beginning date was missing from the axis while the end date stayed.

This forces the min boundary label too (showMinLabel / alignMinLabel), symmetric to the max.

A second issue surfaced once the min label was forced: the shared boundary-dedup formatter (which suppresses a duplicate label at the axis boundary) blanked it. ECharts formats axis labels in repeated ascending passes, and the dedup state carried across the pass boundary, so when the min and max format to the same string (a range that starts and ends in the same month, e.g. "May" to "May"), the min label in the second pass was suppressed by the max from the first. The dedup now resets when the ascending sequence restarts.

Both Timeseries (line/bar/area) and MixedTimeseries share this code and are fixed.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Line chart, Month grain, a range that starts mid-year (May 2003 to May 2005).

Before — the first label is July; the beginning date (May) is missing:

before

After — the beginning date (May) renders at the left edge:

after

TESTING INSTRUCTIONS

  1. Create a Line Chart on a dataset with a temporal column whose data starts mid-period (not on a year boundary), e.g. the examples cleaned_sales_data with order_date.
  2. Set the x-axis to the temporal column, Time Grain = Month, and a range that starts mid-year (e.g. a filter 2003-05-01 ≤ order_date < 2005-06-01).
  3. Update chart. Before this change the first x-axis label is a later "nice" tick and the beginning date is missing; after, the beginning date renders at the left edge.

Automated: Timeseries/transformProps.test.ts asserts showMinLabel is forced for time grains, and that the dedup keeps the forced min label when the endpoints format identically. The full plugin-chart-echarts suite passes.

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@jesperct
jesperct marked this pull request as ready for review July 14, 2026 16:52
@dosubot dosubot Bot added change:frontend Requires changing the frontend viz:charts:echarts Related to Echarts viz:charts:timeseries Related to Timeseries labels Jul 14, 2026
@codecov

codecov Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.25%. Comparing base (2317d9c) to head (e3c4065).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #42046   +/-   ##
=======================================
  Coverage   65.24%   65.25%           
=======================================
  Files        2794     2794           
  Lines      157385   157399   +14     
  Branches    35980    35990   +10     
=======================================
+ Hits       102690   102709   +19     
+ Misses      52718    52713    -5     
  Partials     1977     1977           
Flag Coverage Δ
javascript 71.24% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bito-code-review

bito-code-review Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #9e0934

Actionable Suggestions - 0
Review Details
  • Files reviewed - 4 · Commit Range: 2da6ee9..ab4ccc5
    • superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts
    • superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/MixedTimeseries/transformProps.test.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.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 [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@sadpandajoe
sadpandajoe requested review from msyavuz and villebro July 16, 2026 17:33
@jesperct
jesperct force-pushed the fix/xaxis-beginning-date-missing branch from ab4ccc5 to 4bafa1e Compare July 20, 2026 14:11
@bito-code-review

bito-code-review Bot commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #33dc3a

Actionable Suggestions - 0
Review Details
  • Files reviewed - 4 · Commit Range: 9a3c29e..4bafa1e
    • superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts
    • superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/MixedTimeseries/transformProps.test.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.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 [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@rusackas rusackas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @jesperct, clean fix and I appreciate that the per-pass dedup-reset reasoning is right there in the comment. The only red on CI is playwright-tests-experimental (chromium), and the required playwright job passed, so I'm reading that as flake rather than your change. Looks good to me pending a second pair of eyes.

jesperct added 2 commits July 23, 2026 16:24
A time x-axis only forced the trailing boundary label (showMaxLabel), so a
min date that falls between ECharts' "nice" ticks (e.g. a mid-year month)
rendered no beginning label. Force the min boundary label too (showMinLabel /
alignMinLabel), symmetric to the max.

The boundary-dedup formatter also blanked the forced min label: ECharts formats
labels in repeated ascending passes and the dedup state carried across the pass
boundary, so a min label that formats identically to the max (e.g. a May-to-May
range) was suppressed. Reset the dedup state when the ascending sequence
restarts. Applied to both Timeseries and MixedTimeseries, which share the code.
@jesperct
jesperct force-pushed the fix/xaxis-beginning-date-missing branch from 4bafa1e to e3c4065 Compare July 23, 2026 19:24
@bito-code-review

bito-code-review Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #57ad3b

Actionable Suggestions - 0
Review Details
  • Files reviewed - 4 · Commit Range: 4f8796d..e3c4065
    • superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts
    • superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/MixedTimeseries/transformProps.test.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.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 [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@rusackas

Copy link
Copy Markdown
Member

LGTM now! In it goes!

@rusackas
rusackas merged commit c43effa into apache:master Jul 24, 2026
66 checks passed
niteshpurohit added a commit to HiMamaInc/superset that referenced this pull request Jul 24, 2026
* refactor(mcp): dedupe list-tool schemas and delete dead middleware (apache#41923)

* fix(ag-grid-table): respect row limit with server pagination (apache#41346)

Co-authored-by: Claude Opus 4.8 <[email protected]>

* feat(table/pivot-table): correct non-additive totals/subtotals via DB rollup [SIP-216] (apache#41184)

Co-authored-by: Superset Dev <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
Co-authored-by: Amin Ghadersohi <[email protected]>

* feat(datasets): add RLS filter indicator badge to dataset list and explore view (apache#38807)

Co-authored-by: Evan <[email protected]>

* fix(chart): updates counties of kenya map (apache#38019)

Co-authored-by: Zack Adams <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Evan <[email protected]>
Co-authored-by: Evan Rusackas <[email protected]>

* chore(deps): bump actions/setup-go from 6.5.0 to 7.0.0 (apache#42303)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump nanoid from 5.0.9 to 6.0.0 in /superset-frontend (apache#42230)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: hainenber <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hainenber <[email protected]>
Co-authored-by: Joe Li <[email protected]>
Co-authored-by: Evan <[email protected]>
Co-authored-by: Claude Sonnet 5 <[email protected]>

* test(dashboard): migrate dashboard load smoke test to Playwright (apache#41432)

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* fix(superset_app_root): when used with oauth (apache#38033)

Signed-off-by: Grégoire Bellon-Gervais <[email protected]>
Co-authored-by: Evan Rusackas <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>

* refactor: engine enforce SQLAlchemy 2.0 (apache#42277)

* fix(ag-grid-table): avoid ambiguous build query import (apache#42313)

* fix: Revert "chore(deps): bump echarts from 5.6.0 to 6.1.0 in /superset-frontend" (apache#42314)

Co-authored-by: Claude Opus 4.8 <[email protected]>

* adding circleci config

* fix(plugin-chart-echarts): import the -obj locale build so time axes render (apache#42317)

Co-authored-by: Claude Opus 4.8 <[email protected]>

* fix(pandas_postprocessing): avoid FutureWarning for max/min in boxplot MINMAX (apache#42272)

* fix(heatmap): correct tooltip axis value lookup and percentage calculations and add tests (apache#41864)

Signed-off-by: yousoph <[email protected]>
Co-authored-by: Kamil Gabryjelski <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>

* fix(forecast): resolve time grain robustly for Prophet forecasting (apache#42145)

Co-authored-by: Claude Opus 4.8 <[email protected]>

* fix: Added PostgreSQL 17.X to the supported database versions table in (apache#42280)

* fix(helm): add MCP HTTPRoute configuration (apache#42219)

* fix(dashboard): offer Exit edit mode when there is nothing to discard (apache#42208)

Co-authored-by: Claude Code <[email protected]>

* chore(deps): bump actions/labeler from 6.2.0 to 7.0.0 (apache#42332)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github/codeql-action/analyze from 4.37.0 to 4.37.1 (apache#42331)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github/codeql-action/init from 4.37.0 to 4.37.1 (apache#42334)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @formatjs/intl-durationformat from 0.10.17 to 0.10.18 in /superset-frontend (apache#42337)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump caniuse-lite from 1.0.30001805 to 1.0.30001806 in /docs (apache#42333)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump echarts to 6.1.0 with locale and containLabel guards (apache#42315) (apache#42321)

Co-authored-by: Claude Code <[email protected]>
Co-authored-by: Amin Ghadersohi <[email protected]>

* docs: add pattern to the list of organisations using superset (apache#42341)

* chore(deps): bump ag-grid from 36.0.0 to 36.0.1 in /superset-frontend (apache#42338)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: hainenber <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hainenber <[email protected]>

* fix(mcp): trust dataset is_dttm flag when applying time_grain to VARCHAR temporal columns (apache#42288)

* chore(deps-dev): update taos-ws-py requirement from >=0.6.9 to >=0.7.0 (apache#42344)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump the storybook group in /superset-frontend with 5 updates (apache#42355)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(native-filters): keep filter value input caret at inline start (apache#42323)

Co-authored-by: Claude Opus 4.8 <[email protected]>

* fix(mcp): truncate query-tool responses instead of hard-failing (apache#42244)

* chore(deps): bump nh3 from 0.3.5 to 0.3.6 (apache#42349)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Joe Li <[email protected]>

* chore(deps): bump pydantic from 2.11.7 to 2.13.4 (apache#42350)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Joe Li <[email protected]>

* chore(deps): bump sqlalchemy-continuum from 1.6.0 to 1.7.0 (apache#42351)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Joe Li <[email protected]>

* fix(embedded): stop rejecting guest chart data built from control-specific params keys (apache#42295)

Co-authored-by: Claude Code <[email protected]>

* fix(explore): show the beginning date on time-series x-axis line charts (apache#42046)

* fix(api): add example to get_export_ids_schema so Swagger "Try it out" pre-fills a valid array (apache#42265)

* chore: SQLAlchemy User cascade backref warnings are irrelevant (apache#42360)

* fix(charts): handle async (202) chart-data responses in StatefulChart (apache#42157)

Co-authored-by: Claude Sonnet 4.5 <[email protected]>
Co-authored-by: Evan Rusackas <[email protected]>

* feat(KustoKQL): Add support for NULL / IS NOT NULL operator (apache#37890)

Co-authored-by: ag-ramachandran <[email protected]>
Co-authored-by: Joe Li <[email protected]>

* chore(deps): bump pillow from 12.2.0 to 12.3.0 (apache#42348)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Joe Li <[email protected]>

* chore(deps): bump flask-compress from 1.17 to 1.24 (apache#42346)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Joe Li <[email protected]>

* chore(deps-dev): bump databricks-sql-connector from 4.2.6 to 4.3.0 (apache#42347)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joe Li <[email protected]>
Co-authored-by: Evan Rusackas <[email protected]>

* fix(native-filters): use FILTER_STATE_CACHE_CONFIG timeout for dynamic filter option queries (apache#38910)

* fix(explore): render Jinja before validating legacy chart filters (apache#41996)

* fix(dataset): disable duplicate button when name is empty (apache#42217)

Co-authored-by: AS-MAC-1123 <[email protected]>
Co-authored-by: Evan Rusackas <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>

* docs(gunicorn): correct dead links in values.yaml (apache#42385)

* chore(deps): bump @deck.gl/mapbox from 9.3.6 to 9.3.7 in /superset-frontend in the deckgl group (apache#42377)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump actions/checkout from 7.0.0 to 7.0.1 (apache#42376)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump immer from 11.1.11 to 11.1.15 in /superset-frontend (apache#42378)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump body-parser from 1.20.5 to 1.20.6 in /docs (apache#42370)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump brace-expansion from 1.1.15 to 1.1.16 in /superset-embedded-sdk (apache#42369)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(security): bump pyasn1 from 0.6.3 to 0.6.4 (apache#42363)

* fix(security): bump pillow from 12.2.0 to 12.3.0 (apache#42362)

* docs(map-tiles): add Yandex Maps Tiles API configuration (apache#42375)

* ci: improve conditional checks for lillio tests and build

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: hainenber <[email protected]>
Signed-off-by: Grégoire Bellon-Gervais <[email protected]>
Signed-off-by: yousoph <[email protected]>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Amin Ghadersohi <[email protected]>
Co-authored-by: Evan Rusackas <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
Co-authored-by: Superset Dev <[email protected]>
Co-authored-by: SkinnyPigeon <[email protected]>
Co-authored-by: Zack <[email protected]>
Co-authored-by: Zack Adams <[email protected]>
Co-authored-by: Evan Rusackas <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hainenber <[email protected]>
Co-authored-by: Joe Li <[email protected]>
Co-authored-by: Grégoire <[email protected]>
Co-authored-by: Hans Yu <[email protected]>
Co-authored-by: Elizabeth Thompson <[email protected]>
Co-authored-by: yousoph <[email protected]>
Co-authored-by: Kamil Gabryjelski <[email protected]>
Co-authored-by: Amitesh Gupta <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: Yash Shrivastava <[email protected]>
Co-authored-by: JUST.in DO IT <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: jesperct <[email protected]>
Co-authored-by: Abdul Rehman <[email protected]>
Co-authored-by: jenwitteng <[email protected]>
Co-authored-by: Ramachandran A G <[email protected]>
Co-authored-by: ag-ramachandran <[email protected]>
Co-authored-by: Ujjwal Jain <[email protected]>
Co-authored-by: Jean Massucatto <[email protected]>
Co-authored-by: suvankardas216 <[email protected]>
Co-authored-by: AS-MAC-1123 <[email protected]>
Co-authored-by: Alejandro Solares <[email protected]>
Co-authored-by: ViktorGo86 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend plugins size/L viz:charts:echarts Related to Echarts viz:charts:timeseries Related to Timeseries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants