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
Labels

Comments

@mrdnote
Copy link

@mrdnote 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

This comment has been minimized.

Copy link
Member

@etimberg etimberg commented May 4, 2016

@mrdnote this is as designed.

@albertodonato

This comment has been minimized.

Copy link

@albertodonato albertodonato commented May 14, 2016

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

This comment has been minimized.

Copy link
Member

@panzarino panzarino commented May 23, 2016

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

This comment has been minimized.

Copy link
Member

@etimberg etimberg commented May 24, 2016

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

@przemekd

This comment has been minimized.

Copy link

@przemekd 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

This comment has been minimized.

Copy link
Member

@panzarino 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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.