You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "ccampo (via GitHub)" <gi...@apache.org> on 2025/05/22 06:38:35 UTC
[I] charts leaves out entries where the values are very high [superset]
ccampo opened a new issue, #33556:
URL: https://github.com/apache/superset/issues/33556
### Bug description
I am displaying a pie chart with like 5 different values like this
prd | 1059940745468673
abn | 21242617119422
ent | 11785627626203
int | 5662997427688
tmp | 676080426
The resulting Piechart simply ignores the value for Prd and gives a wrong impression of the numbers. I believe it is also happing for other chart type but this is my example. The numbers are stored bytes. I can fix this by dividing the numbers by 1024 but then the post with Byte/MG/GB is calculated incorrectly.

### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
3.9
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] 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] charts leaves out entries where the values are very high [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #33556:
URL: https://github.com/apache/superset/issues/33556#issuecomment-2902155828
@justinpark were you looking at some bigint issues similar to this?
--
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] charts leaves out entries where the values are very high [superset]
Posted by "ccampo (via GitHub)" <gi...@apache.org>.
ccampo commented on issue #33556:
URL: https://github.com/apache/superset/issues/33556#issuecomment-2911751688
the problem appears in a docker compose setup with a 0.0.0dev version. just deployed in K8s a 3.0.0 where the problem is not showing up (for the same data)
--
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] charts leaves out entries where the values are very high [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #33556:
URL: https://github.com/apache/superset/issues/33556#issuecomment-3940426134
Based on the comments in this thread, this issue appears to be specific to the Docker Compose 0.0.0dev setup and does not reproduce in Superset 3.0.0. Since you confirmed the problem doesn't appear in your K8s deployment with 3.0.0, this suggests the issue was resolved in subsequent releases.
There were several fixes for BIGINT and large number rendering in charts between dev builds and the 3.0.0 release. Closing this as resolved in current versions.
If anyone encounters similar pie chart rendering issues with large numbers on Superset 3.0.0 or later, please open a new issue with:
- Exact Superset version
- Sample data and query
- Screenshots showing the issue
- SQL Lab results showing whether values appear as strings (with quotes) or numbers
Thanks for the detailed report and follow-up! đ
--
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] charts leaves out entries where the values are very high [superset]
Posted by "ccampo (via GitHub)" <gi...@apache.org>.
ccampo commented on issue #33556:
URL: https://github.com/apache/superset/issues/33556#issuecomment-2900086526
superset 3.0.0
--
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] charts leaves out entries where the values are very high [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #33556:
URL: https://github.com/apache/superset/issues/33556#issuecomment-2911755584
<!-- Answer -->
You've already tried casting to BIGINT, but the largest value ("prd") is still missing from your pie chart. This suggests the issue is not just with SQL casting or JavaScript number limitsâyour value is within the safe integer range.
There are known regressions and fixes in Superset related to BIGINT and large number rendering in charts, including pie charts. For example, there was a BIGINT rendering regression in chartAction and a fix for big-number display issues in ECharts, which is the charting library used by Superset pie charts [[source]](https://github.com/apache/superset/blob/master/superset-frontend/CHANGELOG.md). These issues could cause large values to be omitted or displayed incorrectly.
Since you are on Superset 3.0.0, it's possible you are encountering a bug that was fixed in a later release. The changelogs reference fixes for big-number display issues, but there is no specific configuration or workaround documented beyond casting to BIGINT [[source]](https://github.com/apache/superset/blob/master/superset-frontend/CHANGELOG.md).
If you have already cast your metric to BIGINT and the problem persists, here are a few things to check:
- Make sure the query result actually includes the "prd" row with the expected value.
- Try exporting the chart data to CSV to confirm that "prd" is present in the data Superset receives.
- Check if there are any frontend errors in the browser console when rendering the chart.
- If possible, test with a more recent version of Superset to see if the issue is resolved, as there have been fixes for similar problems.
If none of these steps help, this may be a bug that still exists in your version. There is no documented configuration workaround beyond what you've already tried. If you can confirm "prd" is present in the query result but missing in the chart, it is likely a frontend rendering issue related to large numbers.
<!-- Dosu Comment Footer -->
*To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/74304a45-ef17-4100-9496-0c81b81b2403?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/74304a45-ef17-4100-9496-0c81b81b2403?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/74304a45-ef17-4100-9496-0c81b81b2403?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/74304a45-ef17-4100-9496-0c81b81b2403?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/74304a45-ef17-4100-9496-0c81b81b2403?feedback_type=hallucination) | [Report đ](https://app.dosu.dev/response-feedback/74304a45-ef17-4100-9496-0c81b81b2403?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/74304a45-ef17-4100-9496-0c81b81b2403?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [!
[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/33556)
--
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] charts leaves out entries where the values are very high [superset]
Posted by "jihun-ddock (via GitHub)" <gi...@apache.org>.
jihun-ddock commented on issue #33556:
URL: https://github.com/apache/superset/issues/33556#issuecomment-2911805522
> the problem appears in a docker compose setup with a 0.0.0dev version.
Me too. That problem doesn't appear in k8s or pypi build.
> its from a view that is parsed from a jsonb in postgres.
I don't get it. Can you explain it more? Is it a problem for postgres to make "some numbers have quotes and some dont"?
I thought the front-end code was the culprit.
--
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] charts leaves out entries where the values are very high [superset]
Posted by "ccampo (via GitHub)" <gi...@apache.org>.
ccampo commented on issue #33556:
URL: https://github.com/apache/superset/issues/33556#issuecomment-2900096115
chatgpt assume that this might be a limitation in JS rendering.....
3. Chart Rendering (Frontend JS Limits)
⢠JavaScript has a safe integer limit:
Number.MAX_SAFE_INTEGER = 9,007,199,254,740,991 (15â16 digits).
⢠Your number 1059940745468673 (15 digits) is safe, but near the upper limit.
⢠If youâre rendering charts with D3.js, ECharts, or similar, extremely large numbers (especially >16 digits) might lose precision.
--
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] charts leaves out entries where the values are very high [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #33556: charts leaves out entries where the values are very high
URL: https://github.com/apache/superset/issues/33556
--
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] charts leaves out entries where the values are very high [superset]
Posted by "jihun-ddock (via GitHub)" <gi...@apache.org>.
jihun-ddock commented on issue #33556:
URL: https://github.com/apache/superset/issues/33556#issuecomment-2902974815
@ccampo
Can I see a `Run in SQL Lab`? In SQL Lab, maybe you will find that the large number is string below the result. Like this.
```
prd | "1059940745468673"
abn | 21242617119422
ent | 11785627626203
int | 5662997427688
tmp | 676080426
```
This is a problem at the front-end, but it would be nice to try to do `CAST(SUM ~ as BIGINT)` so that it is not recognized as String temporarily. If this doesn't work, there will be no other way but to modify the front-end code directly.
And What Column Type is used_capacity_bytes, out of curiosity?
--
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] charts leaves out entries where the values are very high [superset]
Posted by "ccampo (via GitHub)" <gi...@apache.org>.
ccampo commented on issue #33556:
URL: https://github.com/apache/superset/issues/33556#issuecomment-2911746322
good point some of the numbers have a quote and some dont...... its from a view that is parsed from a jsonb in postgres.....
however in the chart I already defined "SUM(CAST(used_capacity_bytes as BIGINT))" which didnt solve it
--
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] charts leaves out entries where the values are very high [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #33556:
URL: https://github.com/apache/superset/issues/33556#issuecomment-2900100640
<!-- Answer -->
Your analysis about JavaScript's safe integer limit is correct: numbers above 9,007,199,254,740,991 (Number.MAX_SAFE_INTEGER) can lose precision in JavaScript, which can affect chart rendering in libraries like D3.js or ECharts. However, your value (1,059,940,745,468,673) is 15 digits and still within the safe integer range, so it should not lose precision due to JS limits alone.
There are known issues in Superset where large numbersâespecially those stored as NUMERIC/DECIMAL types in databasesâmay be converted to strings or mishandled during chart rendering, causing them to be omitted or displayed incorrectly. One effective workaround is to cast your numeric columns to BIGINT in your SQL query. This ensures Superset treats them as integers and renders all chart segments correctly. For example:
```sql
SELECT column_name, SUM(CAST(numeric_column AS BIGINT)) as sum_value
FROM your_table
GROUP BY column_name
```
This approach has been shown to resolve similar issues with large values in pie charts and other visualizations in Superset [[source]](https://github.com/apache/superset/issues/33174).
There have also been regressions and fixes related to BIGINT and large number rendering in Superset's charting code and ECharts plugin [[source]](https://github.com/apache/superset/blob/master/superset-frontend/CHANGELOG.md), so if you are on an older version, you may want to check if upgrading helps.
In summary: your number is within JS's safe integer range, but casting to BIGINT in your query is a recommended workaround for large-value rendering issues in Superset charts.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://go.dosu.dev/dosubot), mention @dosu-bot.*
---
<sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/35ce2c9f-fe0f-4c13-ba02-97c891cd159f?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/35ce2c9f-fe0f-4c13-ba02-97c891cd159f?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/35ce2c9f-fe0f-4c13-ba02-97c891cd159f?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/35ce2c9f-fe0f-4c13-ba02-97c891cd159f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/35ce2c9f-fe0f-4c13-ba02-97c891cd159f?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/35ce2c9f-fe0f-4c13-ba02-97c891cd159f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/35ce2c9f-fe0f-4c13-ba02-97c891cd159f?feedback_type=other)</sup>
--
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] charts leaves out entries where the values are very high [superset]
Posted by "ccampo (via GitHub)" <gi...@apache.org>.
ccampo commented on issue #33556:
URL: https://github.com/apache/superset/issues/33556#issuecomment-2900465841
@dosu-bot
I specified "SUM(CAST(used_capacity_bytes as BIGINT))" in the metric field of the pie chart and it is still not showing that value
--
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