-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Area chart hover reversed #534
Comments
This is probably a bug, you can fix it with a pull request if you want.
|
I solved this issue by modifying the file morris.js as follow (starting from line 942):
And for stacked bar charts (starting from line 1798):
|
See original bug here morrisjs#534
See original problem here morrisjs#534
Stacked bar looks good, but Line charts hover label order broken :( Also, possible manually set lines "z order"? When two lines on the same position, one line color will above, second line will under. |
When displaying an area chart using morris the order of the labels in the hover is reversed in comparison to the actual data. So the item provided first in the
ykeys
andlabels
is at the top of the hover and at the bottom of the chart, they misalign.For an example you can look at: http://wpcentral.io/version-usage/
A possible workaround would be using the hoverCallback to reverse the order in the DOM after it has been created. But this doesn't seem like the correct way to get this behaviour.
Is this a bug, or is this intended behaviour?
The text was updated successfully, but these errors were encountered: