-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Is there a way to sort a combo chart's layer ? #2399
Comments
@JSoon at the moment there is no way to change the order other than to have the bar dataset come first in the dataset array. I think we can add something to allow custom sorting for drawing and custom sorting for the tooltips |
Gotcha, looking forward to that. |
A "z-index" of sorts is really needed. |
Also need this, +1 |
[Solved] Re-arrange Data Set. Declare Line before bar into Data Set. |
This is not an ideal solution since the order of the Data Sets determines more than the stacking order. For example, it also controls the order of items in the legend. |
I know this is not ideal solution but it give you some move. |
More properly fixed in #3400 |
@etimberg I think it is also better to have a order on the dataset. The current solution of "nearest" of tooltip is not perfect (I tried, and it seems not working). In our project, we have quite lot of charts, all of them shares the same colors theme. The line datasetoverride has logic to be put behind bar datasetoverride. We really need the z-index solution for dataset. Thanks. |
+1, pretty good feature! |
Need this too |
@etimberg Is there any update on this feature ? I strongly suggest to have this feature, since the order of dataset will also affect the order of legend and tooltips. It's really not a good idea to change the order and have to config quite lot colors. |
+1, would be a very welcome addition.. |
+1 Need this! Use Case: using downsampling on all datasets except the last one, so I cat change the order of the datasets. |
+1, i have 10 different stats in my bar chart and it's looks bad, cuz of order. Would be a perfect change) |
+1 a must! |
i'm pretty surprised this hasn't been changed yet. this seems like a super important feature, to be quite honest. i ran into issues with it after only having used it for about 30-45 mins. i'm guessing this is way harder than it sounds, but could you not just add some kind of zIndex prop to the chart options? |
+1. I have multiple series in a line chart. Line colours are muted except for the one the user has selected. I would like to bring the selected line to the front without changing the order in the legend. |
Please revise this issue, as it's still relevant and required to this day. |
@JelleBlaauw i completely agree. i'm unsure why the issue is closed given how many "likes" my last comment has received from almost a year ago. can anyone from the team comment on this issue?—i do not actively need this fix for anything, but i do like this library and use it for personal projects. i would be very happy and willing to submit a PR, or help in some way in the alleviation of this issue. |
Why was this issue closed? This seems like a very basic feature. I was experimenting with Charts.js for the first time and ran into this problem after just a few minutes of playing around with the line charts. |
It looks like this was closed because it was implemented by adding an |
Thanks for the reply, however this only addresses one of the side effects (tioltips) but not the root issue, which is that datasets are rendered in the order they are passed to the api, without the ability to set a "z-index" property. This causes other annoyances other than the tool tips (examples: needing to sort the datasets before passing them to the api causes legend entries to be out of order) |
Hi ! Some news about a dataset |
There is the |
Hello, there!
I'm here to ask question once again. Here is the issue:
I create a combo chart combine Bar with Line, and each of them has tooltips. When i hover a single point "in" a single bar, i can not hover over the point but get the tooltip of bar, looks like below:
And it should be supposed like this:
Any ideas? I mean, kind of like
xAxesZIndex
stuff ;)The text was updated successfully, but these errors were encountered: