Skip to content

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

Merged
sadpandajoe merged 1 commit into
masterfrom
claude/line-chart-error-035765
Jul 22, 2026
Merged

fix(plugin-chart-echarts): import the -obj locale build so time axes render#42317
sadpandajoe merged 1 commit into
masterfrom
claude/line-chart-error-035765

Conversation

@sadpandajoe

Copy link
Copy Markdown
Member

SUMMARY

Every chart with a temporal x-axis (line, area, bar, ...) throws
TypeError: Cannot read properties of null (reading '0') while rendering axis labels.

echarts ships two UMD builds per locale:

file behaviour
echarts/i18n/langEN.js self-registers under echarts' own key, exports nothing
echarts/i18n/langEN-obj.js exports the locale object

Echart.tsx imported the first one, so (await loader()).default was {} — empty, but
truthy, so it passed the if (localeObj) guard and got handed to registerLocale('EN', {}).
That call overwrote the complete locale the very same module had just self-registered,
leaving the registered locale with no time section.

echarts' formatTime builds its result as a chained .replace(), and replacement
arguments are evaluated eagerly — it reads month[u - 1] even when the template is
just {yyyy}. With time missing, month is null and every single axis label throws.

The fix switches all 24 loaders to the -obj.js build, and additionally refuses to register
a locale object that has no time section, so a future bad import degrades to echarts'
built-in locale instead of crashing the chart.

This also stops dragging the full echarts bundle in: the langXX.js CJS branch does
require('echarts/lib/echarts'), which defeats the tree-shaken echarts/core setup this
plugin uses. The -obj factory takes only exports. (Improvement expected, not measured.)

Regression origin

echarts/lib/i18n/lang${locale} (a real ESM module with a full export default) was
swapped for echarts/i18n/lang${locale}.js in #42055, and that path was then carried
forward into the static LOCALE_LOADERS map in #42154. The defect is independent of the
echarts major version — 5.6.0 and 6.1.0 both ship the same two i18n flavours.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

  1. Open any chart with a temporal x-axis (e.g. a line chart from the sample data).
  2. Before this change the chart fails to render and the console shows
    Cannot read properties of null (reading '0') from echarts' formatTime.
    After this change the chart renders with formatted time axis labels.
  3. Repeat with a non-English locale to confirm localized labels still work.

Automated:

cd superset-frontend
npm run test -- plugins/plugin-chart-echarts

A new test in test/components/Echart.test.tsx asserts the object handed to
registerLocale actually carries a 12-entry time.month, which fails against the
previous import path.

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

🤖 Generated with Claude Code

…render

echarts ships two UMD builds per locale: langXX.js self-registers under
echarts' own key and exports nothing, while langXX-obj.js exports the
locale object. The loaders imported the former, so `.default` was an
empty-but-truthy object that passed the guard and was handed to
registerLocale, clobbering the complete locale the same module had just
self-registered.

echarts' formatTime builds its output as a chained replace() whose
arguments are evaluated eagerly, so it reads `month[u - 1]` even for a
"{yyyy}"-only template. With the `time` section gone that throws
"Cannot read properties of null" on every time-axis label, breaking
every chart with a temporal x-axis.

Switch all loaders to the -obj build and reject a locale object with no
`time` section, falling back to echarts' built-in locale rather than
registering a broken one.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bito-code-review

bito-code-review Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #1e7f08

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 22d8e30..22d8e30
    • superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx
    • superset-frontend/plugins/plugin-chart-echarts/test/components/Echart.test.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ 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

@dosubot dosubot Bot added change:frontend Requires changing the frontend viz:charts:echarts Related to Echarts labels Jul 22, 2026
@sadpandajoe sadpandajoe added the 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR label Jul 22, 2026
@github-actions github-actions Bot added 🎪 22d8e30 🚦 building 🎪 ⌛ 48h Environment expires after 48 hours (default) and removed 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR labels Jul 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎪 Showtime is building environment on GHA for 22d8e30

@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 11.53846% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.25%. Comparing base (641713f) to head (22d8e30).

Files with missing lines Patch % Lines
...ins/plugin-chart-echarts/src/components/Echart.tsx 11.53% 23 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #42317   +/-   ##
=======================================
  Coverage   65.25%   65.25%           
=======================================
  Files        2793     2793           
  Lines      157251   157252    +1     
  Branches    35947    35948    +1     
=======================================
+ Hits       102611   102612    +1     
  Misses      52663    52663           
  Partials     1977     1977           
Flag Coverage Δ
javascript 71.14% <11.53%> (+<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.

@github-actions

Copy link
Copy Markdown
Contributor

🎪 Showtime deployed environment on GHA for 22d8e30

Environment: http://44.249.90.140:8080 (admin/admin)
Lifetime: 48h auto-cleanup
Updates: New commits create fresh environments automatically

@sadpandajoe
sadpandajoe merged commit 8d034ef into master Jul 22, 2026
82 checks passed
@sadpandajoe
sadpandajoe deleted the claude/line-chart-error-035765 branch July 22, 2026 21:54
@github-actions github-actions Bot removed 🎪 22d8e30 🌐 44.249.90.140:8080 🎪 ⌛ 48h Environment expires after 48 hours (default) labels Jul 22, 2026
msyavuz pushed a commit to msyavuz/superset that referenced this pull request Jul 24, 2026
…render (apache#42317)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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 <noreply@anthropic.com>

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

Co-authored-by: Superset Dev <dev@superset.apache.org>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Amin Ghadersohi <amin.ghadersohi@gmail.com>

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

Co-authored-by: Evan <evan@preset.io>

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

Co-authored-by: Zack Adams <zack@Zacks-Laptop.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Evan <evan@preset.io>
Co-authored-by: Evan Rusackas <evan@rusackas.com>

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

Signed-off-by: dependabot[bot] <support@github.com>
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] <support@github.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hainenber <dotronghai96@gmail.com>
Co-authored-by: Joe Li <joe@preset.io>
Co-authored-by: Evan <evan@preset.io>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

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

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

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

Signed-off-by: Grégoire Bellon-Gervais <gregoire.bellon-gervais@docaposte.fr>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

* 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 <noreply@anthropic.com>

* 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 <noreply@anthropic.com>

* 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 <sophieyou12@gmail.com>
Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

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

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

* 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 <noreply@anthropic.com>

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

Signed-off-by: dependabot[bot] <support@github.com>
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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
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 <noreply@anthropic.com>
Co-authored-by: Amin Ghadersohi <amin.ghadersohi@gmail.com>

* 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] <support@github.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hainenber <dotronghai96@gmail.com>

* 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] <support@github.com>
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] <support@github.com>
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 <noreply@anthropic.com>

* 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] <support@github.com>
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 <joe@preset.io>

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

Signed-off-by: dependabot[bot] <support@github.com>
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 <joe@preset.io>

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

Signed-off-by: dependabot[bot] <support@github.com>
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 <joe@preset.io>

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

Co-authored-by: Claude Code <noreply@anthropic.com>

* 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 <noreply@anthropic.com>
Co-authored-by: Evan Rusackas <evan@preset.io>

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

Co-authored-by: ag-ramachandran <ramacg@microsoft.com>
Co-authored-by: Joe Li <joe@preset.io>

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

Signed-off-by: dependabot[bot] <support@github.com>
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 <joe@preset.io>

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

Signed-off-by: dependabot[bot] <support@github.com>
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 <joe@preset.io>

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joe Li <joe@preset.io>
Co-authored-by: Evan Rusackas <evan@preset.io>

* 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 <as-mac-1123@AS-MAC-1123.local>
Co-authored-by: Evan Rusackas <evan@rusackas.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* 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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
Signed-off-by: hainenber <dotronghai96@gmail.com>
Signed-off-by: Grégoire Bellon-Gervais <gregoire.bellon-gervais@docaposte.fr>
Signed-off-by: yousoph <sophieyou12@gmail.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Amin Ghadersohi <amin.ghadersohi@gmail.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Superset Dev <dev@superset.apache.org>
Co-authored-by: SkinnyPigeon <e.blackledge@stuart.com>
Co-authored-by: Zack <adams.z.d@gmail.com>
Co-authored-by: Zack Adams <zack@Zacks-Laptop.local>
Co-authored-by: Evan Rusackas <evan@rusackas.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hainenber <dotronghai96@gmail.com>
Co-authored-by: Joe Li <joe@preset.io>
Co-authored-by: Grégoire <greggbg@gmail.com>
Co-authored-by: Hans Yu <hans.yu@outlook.de>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
Co-authored-by: yousoph <sophieyou12@gmail.com>
Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
Co-authored-by: Amitesh Gupta <143833521+singlaamitesh@users.noreply.github.com>
Co-authored-by: David <39565245+dmunozv04@users.noreply.github.com>
Co-authored-by: Yash Shrivastava <119301033+alephys26@users.noreply.github.com>
Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: jesperct <jmilecelento@gmail.com>
Co-authored-by: Abdul Rehman <76230556+Abdulrehman-PIAIC80387@users.noreply.github.com>
Co-authored-by: jenwitteng <jenwit.amonpongitsara@agoda.com>
Co-authored-by: Ramachandran A G <106139410+ag-ramachandran@users.noreply.github.com>
Co-authored-by: ag-ramachandran <ramacg@microsoft.com>
Co-authored-by: Ujjwal Jain <jainujjwal1609@gmail.com>
Co-authored-by: Jean Massucatto <massucattoj@gmail.com>
Co-authored-by: suvankardas216 <rohanrohan510@gmail.com>
Co-authored-by: AS-MAC-1123 <as-mac-1123@AS-MAC-1123.local>
Co-authored-by: Alejandro Solares <219859296+ASolarers-Rodriguez@users.noreply.github.com>
Co-authored-by: ViktorGo86 <114023094+ViktorGo86@users.noreply.github.com>
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/M viz:charts:echarts Related to Echarts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants