Skip to content
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

data containing null breaks line #2435

Closed
mrdnote opened this issue May 2, 2016 · 6 comments
Closed

data containing null breaks line #2435

mrdnote opened this issue May 2, 2016 · 6 comments

Comments

@mrdnote
Copy link

mrdnote commented May 2, 2016

Version 2.0.2.

When I insert a null value in the data array, the chart line is broken. How do I omit horizontal values properly?

image

@etimberg
Copy link
Member

etimberg commented May 4, 2016

@mrdnote this is as designed.

@albertodonato
Copy link

I have the same issue. With 1.0 the point would be skipped, but the line/fill would be continous.
Is it possible to achieve the same result with 2.x?

@panzarino
Copy link
Contributor

I think that an option should be added that allows you to toggle whether the line is broken or not. I looked into this a little bit, but I could not determine where it decides to not draw the line when null.

@etimberg
Copy link
Member

@zachpanz88 its when the point._model.skip property is true. That property is set in the line controller, updateElement function

@przemekd
Copy link

przemekd commented May 25, 2016

@etimberg May you provide any example how to override that property? The chart.js documentation does not provide any examples for that..

@panzarino
Copy link
Contributor

panzarino commented May 26, 2016

I looked into this a little bit, when I set it to always never skip (skip: false) the shading and line gets messed up. It goes from the last non-null point to the last point on the line. A solution will require more than just changing that property. Any other ideas for a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants