-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Stacked stepped time lines does not rendering correctly #8596
Comments
In 2.9 the stacking is based on the array index of the values. So you'd need to make sure each data array contains value (or undefined/NaN) for each point. Or you could upgrade to v3 beta. |
I've created another codepen trying your suggestions but it doesn't working anymore with 2.9v: https://codepen.io/davideferre/pen/yLVQNGB The purple line takes 3 values 0,1 and 2 while I would have expected it to take only 2 |
It appears better when the data goes in as just an array of values. https://codepen.io/etimberg/pen/oNYQjQa |
I can't draw chart as you suggest because the lines appear overlapping. |
Are you trying to have "comp22" in range 0..1 , "comp12" in range 1..2 etc. independent on the other values? "stacked" means the values are added. at index 0 you have You should set the hover and tooltip modes to |
I've a stacked stepped time lines chart that seems to render uncorrect values randomly.


This is the screenshot of the problem:
This is the codpen link to the bug reproduction: https://codepen.io/davideferre/pen/XWNxLKp
I'm using 2.9.4 chart.js version.
As you can see in the screenshot or in codepen the first two point of the violet COMP12 line are
1
and0
but they are at the same height on the Y axis.Sometimes the line render correctly but when I try to disable a dataset the other datasets fall on the same behavior.
Am I doing something wrong or this is a bug?
The text was updated successfully, but these errors were encountered: