-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chart - sum Y column values rather than displaying last Y value #4587
Comments
Hi @akc2267! There is a related discussion on our forum where we explain why the things work in this way and what you can use as a workaround: https://discuss.redash.io/t/wrong-label-view/5237 |
Thank you for the quick response! Unfortunately that solution does not work for my use case. My dashboards are getting aggravatingly slow, as I have to create separate queries for each pie chart. My specific use case is dividing out costs across my Company's various orgs. These are represented in 6 layers (tier 1-6 for example). So in order to have accurate pie charts for all orgs, I need 6 queries to group by the 6 individual tiers. I would much rather have just 1 query that groups by all 6 tiers and displays the most granular dollar amount attributable to the lowest org. I could then attach 6 pie charts to this single query, with each pie chart using a different org tier as the X value and dollars as the Y value. This would massively reduce the time it takes to load my dashboard, especially considering I have filters to single out any specific tier or org. |
@kravets-levko, If I made a merge request to fix this, would it be reviewed? I'm trying to reason with the current format and I just don't see how it could be considered an intended default behavior. Pie chart labels should match their fractional allocations always. |
Most likely we'll fix this one day, but no any estimates for now. If you want to submit a fix - you're welcome 🙂 |
Just a note that this bug affects all chart data labels, not just pie charts |
@kravets-levko, I've found the error in the code: prepareSeries(series, options, additionalOptions) I think the best way to fix this while keeping the general code structure intact is by creating a Dictionary, aggregating y values for each x. I am attempting to do this now. But, I have a general question: why did y'all decide to create your own labels versus using Plotly's built in labels? Surely this is degrading your performance as both plotly and redash are calculating these values (and plotly currently does it incorrectly) |
Issue Summary
Chrome Mac OS. When creating Pie charts, I noticed that the fractional representation is accurate; however, the hover displays the last Y value rather than summing up all Y values for the given X value. This causes hover values that make absolutely no sense.
Steps to Reproduce
Technical details:
The text was updated successfully, but these errors were encountered: