fix(echart): Thrown errors shown after resized#33143
Merged
justinpark merged 4 commits intoapache:masterfrom Apr 17, 2025
Merged
fix(echart): Thrown errors shown after resized#33143justinpark merged 4 commits intoapache:masterfrom
justinpark merged 4 commits intoapache:masterfrom
Conversation
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Unstructured console.error usage ▹ view | 🧠 Not in standard | |
| Tightly coupled locale loading ▹ view | ✅ Fix detected |
Files scanned
| File Path | Reviewed |
|---|---|
| superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
Loving Korbit!? Share us on LinkedIn Reddit and X
| const lang = await import(`echarts/lib/i18n/lang${locale}`); | ||
| return lang?.default; | ||
| } catch (e) { | ||
| console.error(`Locale ${locale} not supported in ECharts`, e); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Comment on lines
110
to
117
| const loadLocale = async (locale: string) => { | ||
| try { | ||
| const lang = await import(`echarts/lib/i18n/lang${locale}`); | ||
| return lang?.default; | ||
| } catch (e) { | ||
| console.error(`Locale ${locale} not supported in ECharts`, e); | ||
| } | ||
| }; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Member
Author
|
cc: @jpchev @pomegranited |
michael-s-molina
approved these changes
Apr 16, 2025
michael-s-molina
pushed a commit
that referenced
this pull request
Apr 24, 2025
(cherry picked from commit 172e5dd)
9 tasks
This was referenced Jan 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
With the introduction of the hotfix related to the #31751 ECharts locale, the
initandsetOptionblocks of ECharts were moved into anasyncblock. This caused an issue where errors occurring during thesetOptionprocess were not passed to thereact-error-boundary.To address this issue, this commit separated the locale's async loading process into a separate async block and added a
didMountstate to ensure that the chart options are properly applied.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
before--echart-throw-errors.mov
After:
after--echart-throw-errors.mov
TESTING INSTRUCTIONS
Create a sankey chart including a cycle data
The error should be shown after rendering
ADDITIONAL INFORMATION