-
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
Resolve issues with sparse datasets #435
Conversation
Hey Nnnick, I am curious if you would be able to elaborate on what you mean when you say fix problems with bezier's splining between points with no value? I was wondering what would be the best behaviour when you have a dataset with a null value in a form [1,2,null,3,...10]. I would guess that you would still want a connection between ? Looking at how a tool like Excel handles this is by having 1 scale on the x but still connecting the dots. http://peltiertech.com/WordPress/plot-two-time-series-with-different-dates/ Again, thanks for your time! |
I found an issue when the datasets are of different lengths the dialog doesn't show up and the following error is thrown, sample http://jsfiddle.net/alexanderjwiebe/xdpE7/ this can be resolved by making both datasets the same length with null values. |
Yeah this PR should fix that issue. As you can see in the line chart image you posted, the bezier handles are in the wrong place - a mathematical example of how they should be you can find here: http://scaledinnovation.com/analytics/splines/aboutSplines.html When calculating the handles, we need to determine the next point without a null value, and using that to calculate the location of the bezier handle, rather than just getting the next point along. I'd hoped to finish this up this weekend but I've had some other stuff on, so I'll try get this wrapped up one evening next week. |
Resolve issues with sparse datasets & solve bezier capping to scale bounds
I got a question if I want to connect the lines between a null value, how can I achieve that for example [1, 2, null, 4] I want to connect the 2 with the 4 but right now it breaks the line |
@Jasguerrero in v2 use the |
@etimberg what http://www.chartjs.org/docs/#line-chart-introduction I don't see anything that refers to that. Found it here, #2803 Although it's buggy, doesn't seem to plot the lines between the null points correctly. |
@t202wes there is a known issue with bezier curves. Setting the tension to 0 is a possible work around |
Pass
null
as a value for Bar/Line/Radar chart values to not render that particular point.Started as a solution to #426 but investigating there were some issues with sparse datasets in general.
Todo before merging: