Replies: 2 comments
-
I don't have a good solution on the sorting, but can you use something like https://github.com/sgratzl/chartjs-chart-error-bars to draw the error bars instead? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you! This does look like it could have made it easier to build boxes
and whiskers. I may end up using this to simplify my code. My main issue
now is the sorting within groups, though - let me know if you have any
clever ideas on that front (and I will post here if I come up with a
solution, in case others ever have this need). Thanks again for the error
bar tip. Much appreciated.
…On Tue, May 3, 2022 at 7:08 PM Evert Timberg ***@***.***> wrote:
I don't have a good solution on the sorting, but can you use something
like https://github.com/sgratzl/chartjs-chart-error-bars to draw the
error bars instead?
—
Reply to this email directly, view it on GitHub
<#10326 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AY57KMY6HSQEFNOCNPS7V4TVIGWYVANCNFSM5UTPKE3Q>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! Huge fan of ChartJS - huge thanks to the people who made this.
I have a stacked bar chart with groups. In the attached example, there are two "groups" of stacked bars (they are in fact stacked floating bars - hacked it to make it look like box and whiskers). I want to be able to sort the data within each group from lowest to highest bar mid point.
I can do this for one of the groups by just sorting my whole chart.data.datasets array by the midpoint of each of the first group's bars... but this sorts all my data (including for the other group), when I really want to be able to sort the data for each group separately.
A single row of of my chart.data.datasets array looks like this:
[[lowerBound group1, upperBound group1],[lowerBoundGroup2, upperBoundGroup2]]
And Chart.js by default sorts all the data according to the order of this parent array, chart.data.datasets. Is there some built-in way to sort within groups? And, if there's not a built in way, any ideas about how I could pull it off?
Thanks in advance for whatever guidance you all might be able to provide - and thanks again for a fantastic data visualization resource.
Beta Was this translation helpful? Give feedback.
All reactions