You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "mandar0324 (via GitHub)" <gi...@apache.org> on 2026/02/18 06:51:00 UTC

[I] ECharts Bar Chart renders only currency symbol ($) when Show Value is enabled with stacked bars [superset]

mandar0324 opened a new issue, #38037:
URL: https://github.com/apache/superset/issues/38037

   ### Bug description
   
   Superset version:
   5.0.0
   
   Chart type:
   ECharts Bar Chart
   
   Configuration:
   - Stacked bar
   - Show Value enabled
   - Currency prefix ($)
   - Near-zero negative values
   - Row limit: 50
   
   Steps to reproduce:
   1. Create dataset with mostly small negative values (e.g. -1 to -5)
   2. Add one large negative outlier (e.g. -4,000,000)
   3. Create ECharts Bar Chart
   4. Enable stacked bars
   5. Enable "Show Value"
   6. Apply currency prefix ($)
   
   Expected behavior:
   Numeric values should render correctly with currency formatting (e.g., $1,234), and should not display only the currency symbol.
   
   Actual behavior:
   Only the currency symbol "$" is rendered repeatedly without numeric values, particularly for near-zero values.
   Occurs in both horizontal and vertical orientation.
   
   <img width="1468" height="774" alt="Image" src="https://github.com/user-attachments/assets/caaccd2f-73e6-48ab-84be-e98d0fdf73d8" />
   
   <img width="1466" height="779" alt="Image" src="https://github.com/user-attachments/assets/0add6564-7736-43b5-9af0-aff2ceb88ca1" />
   
   [warehouse_handling_dummy_data.csv](https://github.com/user-attachments/files/25383785/warehouse_handling_dummy_data.csv)
   
   Browser:
   Google Chrome 143.0.7499.193 (Official Build) (arm64)
   
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] ECharts Bar Chart renders only currency symbol ($) when Show Value is enabled with stacked bars [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #38037:
URL: https://github.com/apache/superset/issues/38037#issuecomment-3919064445

   <!-- Greeting -->
   Hi @mandar0324! I'm [Dosu](https://go.dosu.dev/dosubot) and Iโ€™m helping the superset team.
   
   <!-- Answer -->
   Thanks for the detailed bug report! I looked into the code and found a likely root cause.
   
   **The issue:** When your near-zero negative values (e.g., -1 to -5) are formatted alongside a large outlier (-4,000,000), Superset uses the [SMART_NUMBER formatter](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-core/src/number-format/factories/createSmartNumberFormatter.ts#L24-L47) which applies SI notation. For very small values relative to the scale, this can produce strings like `$-1ยต` or `$-100n` where the micro (ยต) or nano (n) symbols may not render correctly in the ECharts label, leaving only the `$` visible.
   
   Additionally, the [stacked bar threshold logic](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts#L58-L93) calculates percentage thresholds to filter which values display labels. With a massive outlier dominating the scale, your near-zero values become an extremely small percentage, potentially triggering edge cases.
   
   **Workaround:** Try overriding the default number format with an explicit d3-format string (e.g., `$,.0f` or `$,.2f`) instead of relying on the adaptive SMART_NUMBER format. This should prevent SI notation from being used for small values.
   
   There have been recent fixes in this area ([#37039](https://github.com/apache/superset/pull/37039), [#36989](https://github.com/apache/superset/pull/36989)) for related currency formatting issues, so this may be a new edge case worth filing if the workaround doesn't help.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/b781825c-f3d4-4978-bc73-0d3a3be463fb?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b781825c-f3d4-4978-bc73-0d3a3be463fb?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b781825c-f3d4-4978-bc73-0d3a3be463fb?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b781825c-f3d4-4978-bc73-0d3a3be463fb?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b781825c-f3d4-4978-bc73-0d3a3be463fb?feedback_type=hallucination) | [Report ๐Ÿ›](https://app.dosu.dev/response-feedback/b781825c-f3d4-4978-bc73-0d3a3be463fb?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b781825c-f3d4-4978-bc73-0d3a3be463fb?feedback_type=other)</sup>
   
   [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Thanks%20for%20the%20detailed%20bug%20report%21%20I%20looked%20into%20the%20code%20and%20found%20a%20likely%20root%20cause.%0A%0A%2A%2AThe%20issue%3A%2A%2A%20When%20your%20near-zero%20negative%20values%20%28e.g.%2C%20-1%20to%20-5%29%20are%20formatted%20alongside%20a%20large%20outlier%20%28-4%2C000%2C000%29%2C%20Superset%20uses%20the%20%5BSMART_NUMBER%20formatter%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-core/src/number-format/factories/createSmartNumberFormatter.ts%23L24-L47%29%20which%20applies%20SI%20notation.%20For%20very%20small%20values%20relative%20to%20the%20scale%2C%20this%20can%20produce%20strings%20like%20%60%24-1%C2%B5%60%20or%20%60%24-100n%60%20where%20
 the%20micro%20%28%C2%B5%29%20or%20nano%20%28n%29%20symbols%20may%20not%20render%20correctly%20in%20the%20ECharts%20label%2C%20leaving%20only%20the%20%60%24%60%20visible.%0A%0AAdditionally%2C%20the%20%5Bstacked%20bar%20threshold%20logic%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts%23L58-L93%29%20calculates%20percentage%20thresholds%20to%20filter%20which%20values%20display%20labels.%20With%20a%20massive%20outlier%20dominating%20the%20scale%2C%20your%20near-zero%20values%20become%20an%20extremely%20small%20percentage%2C%20potentially%20triggering%20edge%20cases.%0A%0A%2A%2AWorkaround%3A%2A%2A%20Try%20overriding%20the%20default%20number%20format%20with%20an%20explicit%20d3-format%20string%20%28e.g.%2C%20%60%24%2C.0f%60%20or%20%60%24%2C.2f%60%29%20instead%20of%20relying%20on%20the%20adaptive%20SMART_NUMBER%20format.%20This%20should%20prevent%20SI%20notation%20from%20being%20used%
 20for%20small%20values.%0A%0AThere%20have%20been%20recent%20fixes%20in%20this%20area%20%28%5B%2337039%5D%28https%3A//github.com/apache/superset/pull/37039%29%2C%20%5B%2336989%5D%28https%3A//github.com/apache/superset/pull/36989%29%29%20for%20related%20currency%20formatting%20issues%2C%20so%20this%20may%20be%20a%20new%20edge%20case%20worth%20filing%20if%20the%20workaround%20doesn%27t%20help.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/38037)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] ECharts Bar Chart renders only currency symbol ($) when Show Value is enabled with stacked bars [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #38037: ECharts Bar Chart renders only currency symbol ($) when Show Value is enabled with stacked bars
URL: https://github.com/apache/superset/issues/38037


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] ECharts Bar Chart renders only currency symbol ($) when Show Value is enabled with stacked bars [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #38037:
URL: https://github.com/apache/superset/issues/38037#issuecomment-5802447813

   Thanks @mandar0324. Looks like #38695 fixed the bare `$` labels on master, and #44469 (just merged) cleaned up the colliding labels in your second screenshot. Closing this out, but holler if you still see it on a recent build and I'll reopen.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] ECharts Bar Chart renders only currency symbol ($) when Show Value is enabled with stacked bars [superset]

Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on issue #38037:
URL: https://github.com/apache/superset/issues/38037#issuecomment-5754265882

   The originally reported symptom here โ€” value labels on negative horizontal stacked segments clipping off-canvas down to a bare currency symbol โ€” is already fixed on `master`, as a side effect of #38695 (which changed the negative-horizontal label anchor from `insideLeft` to `left`, so the label no longer draws off the edge of the chart).
   
   Investigating this also surfaced a related but distinct, still-live defect: on stacked bars where several segments are much smaller in magnitude than another segment/outlier in the same series, their (non-zero) value labels can collide and overlap into illegible garbled text โ€” this matches the second screenshot on this issue and reproduces on current `master`. That's now tracked separately in #44466, since it has a different root cause and doesn't depend on the horizontal-clipping mechanism above.
   
   (Found via automated investigation โ€” Agor/Ultraset.)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org