-
Notifications
You must be signed in to change notification settings - Fork 19.7k
[Feature] Support for 100% stacked charts #17179
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
Comments
The advised way to do so is to calculate percentage as you said. The tooltip can set |
Hi @Ovilia, I tried implementing the tooltip in valueFormatter but I'm not given the params object (which is available a few levels up the call stack) so the only information I know is the percentage value. If I use the tooltip formatter instead then I lose the nice default tooltip containing the series colour and other information. Thanks for your help :) |
You should probably save the sum to a variable that can be accessed by |
Just a note that this looks similar in implementation to the following PR: |
Hi. Any updates on this? I still see no way to make bar charts stack to 100% easily, without hacking with 0.X values. |
Hi. is this still updated |
+1, Please implement this |
I've opened a PR #20910 to address this by adding |
What problem does this feature solve?
I am trying to emulate the functionality provided by Excel and echarts has no native support for 100% stacked charts.
I have tried to work around this by calculating the percentages myself but then you lose the original value tooltip.
There is an existing issue about this here:
#8785
Apache superset has already implemented this feature, see here: (in the superset code it's called a 'contribution')
apache/superset#13580
What does the proposed API look like?
My suggestion is that you extend the 'stack' syntax to support something like this:
stack: { name: 'male', type: '100%' }
The text was updated successfully, but these errors were encountered: