Repository navigation
feat(plugin-chart-echarts): add Candlestick Chart - #43863
Conversation
This reverts commit 35aaeb6.
|
Thanks for wiring up |
There was a problem hiding this comment.
Code Review Agent Run #457542
Actionable Suggestions - 11
-
superset/translations/zh_TW/LC_MESSAGES/messages.po - 1
- K線 term spacing inconsistent · Line 1053-1053
-
superset/translations/ta/LC_MESSAGES/messages.po - 1
- CWE-1007: Legend Mistranslated As Mythology · Line 9993-9993
-
superset/translations/sr_Latn/LC_MESSAGES/messages.po - 1
- CWE-451: Cyrillic Homoglyph In Latin Locale · Line 13439-13439
-
superset/translations/ca/LC_MESSAGES/messages.po - 5
- Tooltip term inconsistency · Line 9450-9450
- Tooltip term inconsistency · Line 9453-9453
- Tooltip term inconsistency · Line 10709-10709
- Formal register inconsistency · Line 11634-11634
- Color label terminology mismatch · Line 19701-19702
-
superset/translations/cs/LC_MESSAGES/messages.po - 3
- Label/tooltip word collision · Line 9099-9099
- Label/tooltip word collision · Line 9102-9102
- Inconsistent series term · Line 13956-13956
Additional Suggestions - 18
-
superset/translations/zh/LC_MESSAGES/messages.po - 3
-
Duplicate translation collision · Line 3261-3261Lines 3260-3264: both `msgid "Candlestick"` and `msgid "Candlestick Chart"` now translate to the identical `msgstr "K线图"`. gettext maps strings, not ids, so both source strings collapse to one UI string; wherever the UI shows both the control label and the chart-type name, they become indistinguishable in Chinese. Give the two entries distinct translations.
-
Tooltip term inconsistency · Line 9193-9193Lines 9193, 9196 and 10474 render "tooltip" as bare "提示", while the file's established translations use "工具提示" (e.g. line 4332 "工具提示中要显示的列。", line 2406 "认证工具提示", line 5080 "自定义工具提示模板"). Two terms for the same UI concept in one catalog is inconsistent; align the new entries with "工具提示".
-
OHLC untranslated acronym · Line 11030-11030Line 11030: `msgid "OHLC"` is filled with the unchanged English acronym `"OHLC"`, while `msgid "Candlestick"` (line 3260) becomes "K线图". OHLC and candlestick are distinct chart types (the line-3266 description contrasts them), yet both now render as "K线图"-family labels indistinguishably in Chinese. Translate OHLC (e.g. "开高低收") or verify the acronym is the accepted zh term.
-
-
superset/translations/fa/LC_MESSAGES/messages.po - 1
-
Legend term inconsistent · Line 10782-10782This sentence translates both "legend" and "tooltip"; `legend` becomes bare `راهنما`, but the catalog consistently renders `legend` as `افسانه` (`Legend` at L9668, `Legend Format`, `Legend Orientation`, plus `Additional padding for legend.`) and `tooltip` as `راهنمای ابزار`. Bare `راهنما` is ambiguous next to `راهنمای ابزار` in the same sentence; use `افسانه` for terminology consistency.
-
-
superset/translations/pt_BR/LC_MESSAGES/messages.po - 1
-
Untranslated label · Line 3407-3407The `msgstr` for `msgid "Candlestick"` is set to the identical English string "Candlestick", so the label renders untranslated for pt_BR users. The sibling entry `Candlestick Chart` -> "Gráfico de candlestick" (line 3410) is localized; this one should be too for consistency.
-
-
superset/translations/uk/LC_MESSAGES/messages.po - 4
-
Terminology inconsistency · Line 3252-3252The `Candlestick` label is translated as "Японські свічки" ("Japanese candlesticks"), adding a qualifier absent from the source and diverging from the file's own terminology: `Candlestick Chart` (line 3255) and the descriptions at 3261/10135/10881 all use "свічковий/свічки". Align this entry with the established term, e.g. "Свічки".
-
Mistranslated description · Line 4139-4139The source "Color used when the close value is greater than or equal to the open value." becomes "Колір, якщо ..." ("Color, if ..."), a fragment that drops "used when" and reads as a conditional. Suggest "Колір, який використовується, коли значення закриття більше або дорівнює значенню відкриття."
-
Mistranslated description · Line 4142-4142Same issue as the sibling entry at line 4139: "Color used when the close value is less than the open value." becomes "Колір, якщо ..." ("Color, if ..."). Suggest "Колір, який використовується, коли значення закриття менше за значення відкриття."
-
Non-standard word choice · Line 11012-11012"Накласти" is a Russian-style calque; standard Ukrainian for "Overlay ..." is "Накладати" (or an imperative "Накладайте"). The sibling entry at line 10022 already uses standard terminology ("Ковзні середні"). Suggest "Накладати прості ковзні середні ціни закриття (MA5, MA10, MA15, ...)."
-
-
superset/translations/de/LC_MESSAGES/messages.po - 4
-
Chart name naming inconsistency · Line 3218-3218The display-name msgid "Candlestick Chart" is translated "Kerzenchart", while every other chart display name in this catalog uses the "-Diagramm" pattern verified in-file: "Liniendiagramm", "Balkendiagramm", "Trichterdiagramm", "Wasserfall-Diagramm". The chart-type picker will show one off-pattern name among ~24. Suggest "Kerzenstock-Diagramm"; keep "Kerzenchart" for the short msgid "Candlestick" (line 3215).
-
Series term inconsistency · Line 13555-13555"Series colors" is translated "Reihenfarben", but the same catalog already translates the "Series *" family with the "Zeitreihen-" stem (verified in-file: "Series Height" -> "Zeitreihenhöhe", "Series limit" -> "Zeitreihenbegrenzung", "Series type" -> "Zeitreihentyp", 12 entries vs 3 new "Reihen*" forms). Suggest "Zeitreihenfarben" to avoid split terminology for one concept.
-
Series term inconsistency · Line 13567-13567"Series name" -> "Reihenname" introduces a second German term for the "Series" concept that this catalog already renders "Zeitreihen*" (12 counted entries, e.g. "Series type" -> "Zeitreihentyp"). The neighboring candlestick panel will mix "Reihenname" with "Zeitreiheneinstellungen". Suggest "Zeitreihenname".
-
Duplicate term, two translations · Line 13573-13573"Series style" -> "Reihenstil" collides with the pre-existing msgid "Series Style" -> "Zeitreihenstil" (messages.po, verified via grep): the same English term now has two different German translations, and both diverge from the 12 established "Zeitreihen*" entries. Suggest "Zeitreihenstil" so both spellings resolve identically.
-
-
superset/translations/sr/LC_MESSAGES/messages.po - 3
-
Tooltip term inconsistent · Line 10891-10891This new string renders "tooltip" as "опису" (description), but the catalog's established term for tooltip is "облачић" (17 occurrences, e.g. `Садржај облачића`, `Формат времена у облачићу`); "опис" already means description elsewhere (`Сакриј опис графикона`). The UI label will read as "in the description". Use "у облачићу" for consistency. ([CWE-707](https://cwe.mitre.org/data/definitions/707.html))
-
Tooltip term inconsistent · Line 10894-10894Same inconsistency as line 10891: "tooltip" is rendered "опису" (description) while the catalog uses "облачић" for tooltip (17 occurrences). The increasing-candle label will read "in the description" in the UI. Prefer "у облачићу". ([CWE-707](https://cwe.mitre.org/data/definitions/707.html))
-
Tooltip term inconsistent · Line 12347-12348Same inconsistency as lines 10891/10894: "tooltip" is rendered "опису" (description) while the catalog uses "облачић" for tooltip (17 occurrences). This series name surfaces in the legend and tooltip, so it will read "...and description". Prefer "у легенди и облачићу". ([CWE-707](https://cwe.mitre.org/data/definitions/707.html))
-
-
superset/translations/ta/LC_MESSAGES/messages.po - 1
-
CWE-1008: Inconsistent Label Terminology · Line 8832-8832"Label used for decreasing/increasing candles in the tooltip." is translated with "சிட்டை" (a rare word for label/tag). The file uses "லேபிள்" for label in 61 other entries (e.g. "Label used for decreasing candles..." siblings and "Cluster label aggregator"), so these two entries introduce inconsistent terminology for the same UI concept. ([CWE-1008](https://cwe.mitre.org/data/definitions/1008.html))
-
-
superset-frontend/plugins/plugin-chart-echarts/test/Candlestick/EchartsCandlestick.test.tsx - 1
-
Missing stop assertion · Line 176-180The sibling test (`opens drill-to-detail...`, lines 125-133) asserts `stop` was called; this new test invokes `eventHandlers.contextmenu` with `stop: jest.fn()` but never asserts it. If `eventParams.event?.stop?.()` regresses in `EchartsCandlestick.tsx` (line 117), this test still passes. Assert `stop` to fully cover the handler contract.
-
Filtered by Review Rules
Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.
-
superset/translations/fr/LC_MESSAGES/messages.po - 1
- Machine translations unreviewed · Line 1020-1020
-
superset/translations/fi/LC_MESSAGES/messages.po - 1
- Unreviewed machine translations merged · Line 1471-1473
-
superset/translations/zh/LC_MESSAGES/messages.po - 1
- Fuzzy flag left on entry · Line 1048-1048
Review Details
-
Files reviewed - 34 · Commit Range:
70bbf65..56875b8- superset/translations/ar/LC_MESSAGES/messages.po
- superset/translations/babel.cfg
- superset/translations/ca/LC_MESSAGES/messages.po
- superset/translations/cs/LC_MESSAGES/messages.po
- superset/translations/de/LC_MESSAGES/messages.po
- superset/translations/en/LC_MESSAGES/messages.po
- superset/translations/es/LC_MESSAGES/messages.po
- superset/translations/fa/LC_MESSAGES/messages.po
- superset/translations/fi/LC_MESSAGES/messages.po
- superset/translations/fr/LC_MESSAGES/messages.po
- superset/translations/it/LC_MESSAGES/messages.po
- superset/translations/ja/LC_MESSAGES/messages.po
- superset/translations/ko/LC_MESSAGES/messages.po
- superset/translations/lv/LC_MESSAGES/messages.po
- superset/translations/messages.pot
- superset/translations/mi/LC_MESSAGES/messages.po
- superset/translations/nl/LC_MESSAGES/messages.po
- superset/translations/pl/LC_MESSAGES/messages.po
- superset/translations/pt/LC_MESSAGES/messages.po
- superset/translations/pt_BR/LC_MESSAGES/messages.po
- superset/translations/ro/LC_MESSAGES/messages.po
- superset/translations/ru/LC_MESSAGES/messages.po
- superset/translations/sk/LC_MESSAGES/messages.po
- superset/translations/sl/LC_MESSAGES/messages.po
- superset/translations/sr/LC_MESSAGES/messages.po
- superset/translations/sr_Latn/LC_MESSAGES/messages.po
- superset/translations/ta/LC_MESSAGES/messages.po
- superset/translations/th/LC_MESSAGES/messages.po
- superset/translations/tr/LC_MESSAGES/messages.po
- superset/translations/uk/LC_MESSAGES/messages.po
- superset/translations/zh/LC_MESSAGES/messages.po
- superset/translations/zh_TW/LC_MESSAGES/messages.po
- superset-frontend/plugins/plugin-chart-echarts/src/Candlestick/EchartsCandlestick.tsx
- superset-frontend/plugins/plugin-chart-echarts/test/Candlestick/EchartsCandlestick.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 an incremental AI Review. -
/review full- 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
Code Review Agent Run #4263efActionable Suggestions - 0Additional Suggestions - 3
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
@rusackas @sadpandajoe |
Code Review Agent Run #dcfbebActionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Code Review Agent Run #2be35fActionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
rusackas
left a comment
There was a problem hiding this comment.
Heya @SBIN2010, this has been through a lot of rounds already and the shape is solid, the null-sentinel fix, the axis-trigger tooltip, the camelCase/snake_case formData fix, and the drill-to-detail IS NULL restoration all check out against the current code.
A couple more things turned up on a deeper pass, both real:
transformProps.ts around line 732: the drill-to-detail filter for the Series dimension uses seriesKeys[index], the stringified dedup key, instead of the raw datum value. xValues a couple lines up does it right (re-reads the raw value). For a numeric or boolean series column, right-clicking and drilling to detail emits a filter like val: "42" instead of val: 42, Postgres rejects that with a type mismatch.
Also, transformProps.ts falls back to '' when x_axis is unset, but buildQuery.ts (via getXAxisColumn) falls back to __timestamp in that same case. Explore's own validator won't let you leave x_axis empty interactively, but an API-created or imported chart can reach it, and the chart collapses into one arbitrary candle when it does.
I'll push fixes for both plus a related one (moving averages can show gaps caused by a different series' missing dates, since they're computed off the union-padded x-axis) since I gather that's fine with you. Will follow up here once it's in.
…nd MA gaps Three issues found on a deeper review pass: - The drill-to-detail filter for the Series dimension used the stringified dedup key instead of the raw datum value, so a numeric or boolean series column emitted a filter like val: "42" instead of val: 42 and could fail with a SQL type mismatch. xValues already read the raw value correctly; seriesValues now does too, via a parallel seriesRecords array. - transformProps.ts fell back to an empty string when x_axis was unset, while buildQuery.ts (via getXAxisColumn) falls back to the temporal column. Explore's own validator prevents leaving x_axis empty interactively, but an API-created or imported chart can reach it, and every row collapsed into one category. Now uses getXAxisLabel, the same helper Timeseries/transformProps.ts already uses for this. - Moving averages were computed from the union-of-all-series, null-padded x-axis array, so a series with sparse dates relative to another series in the same chart could get spurious MA gaps caused by the other series' calendar, not its own. Now computed from each series' own compact close-price array, then scattered back onto the shared category axis so it still lines up with the candles. Co-Authored-By: Evan Rusackas <[email protected]> Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
Pushed in d8b0c19: |
There was a problem hiding this comment.
Code Review Agent Run #e7894c
Actionable Suggestions - 1
-
superset-frontend/plugins/plugin-chart-echarts/src/Candlestick/transformProps.ts - 1
- Redundant type assertion · Line 370-370
Additional Suggestions - 2
-
superset-frontend/plugins/plugin-chart-echarts/test/Candlestick/transformProps.test.ts - 1
-
Duplicated ChartProps setup · Line 733-741This inline `new ChartProps(...)` block is behaviorally identical to the file's `transform()` helper (lines 73-85): `transform(seriesData, { series: 'symbol', moving_averages: [2] })`. The sibling new test at line 236 and ~13 existing tests use that helper; only 3 older tests inline it. Reusing the helper keeps chart construction in one place so a future default change can't diverge.
-
-
superset-frontend/plugins/plugin-chart-echarts/test/Candlestick/EchartsCandlestick.test.tsx - 1
-
Missing stop assertion · Line 194-203The sibling contextmenu tests assert `expect(stop).toHaveBeenCalled()` after invoking `eventHandlers.contextmenu`, but this new test creates `stop` and passes it through without asserting it. Adding the same assertion keeps the regression net consistent for the `event?.stop?.()` side effect in `EchartsCandlestick`'s contextmenu handler.
-
Review Details
-
Files reviewed - 3 · Commit Range:
b1c3e7d..d8b0c19- superset-frontend/plugins/plugin-chart-echarts/src/Candlestick/transformProps.ts
- superset-frontend/plugins/plugin-chart-echarts/test/Candlestick/EchartsCandlestick.test.tsx
- superset-frontend/plugins/plugin-chart-echarts/test/Candlestick/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 an incremental AI Review. -
/review full- 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
Code Review Agent Run #be5770Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
rusackas
left a comment
There was a problem hiding this comment.
LGTM. sadpandajoe's latest round caught real things on top of my earlier fixes, the null-vs-'-' tooltip gap in the MA line, the extractQueryFields OHLC aliases needing to also land in the chart-type-switch registry, and a more robust index-based series lookup that supersedes the name-based one I patched, all fixed in 1ec5fe3 and verified. CI's fully green. Approving.
SUMMARY
A new visualization type, the Candlestick Chart
implements the idea #20254 and #37653
Adds a native ECharts Candlestick Chart (
viz_type: candlestick) for OHLC time series.Query
[open, close, low, high]Series style (
series_style)Display
echart_optionsTooltip
trigger: 'axis'): on a date, lists every candle plus MA values for that categoryColoring
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
run test
npm run test superset-frontend/plugins/plugin-chart-echarts/test/Candlestick
ADDITIONAL INFORMATION