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

Strange horizontal lines displayed on zoom #103

Closed
cmccar opened this issue Sep 11, 2017 · 7 comments
Closed

Strange horizontal lines displayed on zoom #103

cmccar opened this issue Sep 11, 2017 · 7 comments

Comments

@cmccar
Copy link

cmccar commented Sep 11, 2017

I am plotting a few series of data with a time based x-axis and a numerical based y-axis.

The chart appears as such prior to any zooming:
image

However, upon zooming into a particular section, I often then see strange erroneous horizontal lines within the chart such as pictured here:
image

This is the code I use to create and configure the chart (using a screen grab because the "Insert code" functionality seems to remove all the line endings and formatting from my Javascript when I preview the post):
image

If anyone has an idea as to what may be happening, I would greatly appreciate some insight!

@timKnodel
Copy link

I see the same behavior, but only with Chrome. Edge and Firefox do not have the same behavior.

@timKnodel
Copy link

Setting the datasets boarderWidth to anything other than 1 fixed the issue for me.

@cmccar
Copy link
Author

cmccar commented Sep 22, 2017

Ah okay, thanks I appreciate your insight.

I am currently on vacation, but will definitely try changing the borderWidth property to a different number when I'm back and see if that resolves it.

@BorisVanin
Copy link

timKnodel , thank you so much! I was looked a solution for that artifact lines for 2 years!!! I use Electron so I forced to use Chrome engine. Now I set borderWidth to 1.1 and horizontal lines disappear. Just curious, how did you find a reason?

@heshamfathi
Copy link

@timKnodel I had the same issue and solved it by setting boarderWidth to 2 or anything but 1 and it worked, thanks a ton.

@joeboe17
Copy link

Changing borderWidth did not seem to help me, but I found more workarounds. The bug stops when you change the cubicInterpolationMode from 'default' to 'monotone' or if you set lineTension to 0.

@nagix
Copy link
Collaborator

nagix commented Jan 7, 2019

The cause of the issue was in bezier control points off the chart, and this has been fixed in chartjs/Chart.js#5937.

@nagix nagix closed this as completed Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants