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 + TimeSeries + Values crossing positiveToNegative - Fail to rappresent #165
Comments
Hi @maxcuttins This output is caused by the following block in jqplot.core.js
note that Expected: (comment out if statement)
I am not exactly sure why this condition exists, however commenting it out will produce your expected result. @johanbove do you have any input? |
@dg-hub I don’t know why this if branch is there. I don’t understand the comment before it either. What if we drop this if statement and fix the reported issue? |
No @dg-hub, your results are both wrong. The issue is not about go negative, the issue is about drawing the starting point of the series on top of the last positive series (and not from the zero line). So while the series is negative the entiry area of the series overlap all the previuous series. This is the issue. at the moment the "ACTUAL" is better than what you suggest. |
@maxcuttins That is interesting. So how do we proceed here? How do we deal with overlap in stacked charts ? Make the layers somewhat transparent ? |
Hi @maxcuttins Thanks for your comments, the expected example is how a stacked filled chart is rendered in Microsoft Excel. When a series has negative values. It is subtracted from the prior series. I can send a screen shot of this soon. The same issue exists in Excel, there is overlap in stacked series. Do you have a proposed solution as to how you would prefer it to be rendered? Can you provide a screen shot or example? |
Microsoft Excel have toons of bug and it's not a good example. http://www.chartjs.org/samples/latest/charts/area/line-stacked.html In this case the only overlapping point is the moment that series go negative (so just one data point). This is the right behaviour that let you have perfectly stacked charts without overlap (without counting the switching points). Note that in this example there is too much curvy lines instead of sharp ones. So the example is a bit messy, but however the behaviour is right. |
I have several series to stack. Some of these series are always positive, other negative, other can be both positive and negative at some point in the graph.
It seems that JQplot is breaking the chart every time a series pass from positive to negative and viceversa.
I tried also starting with your example and put some data positive and negative and it show the same issue:
The text was updated successfully, but these errors were encountered: