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

[BUG] Stepped line graph, thin lines disappear on certian screen widths #5576

Closed
maxymczech opened this issue Jun 19, 2018 · 3 comments · Fixed by #5880
Closed

[BUG] Stepped line graph, thin lines disappear on certian screen widths #5576

maxymczech opened this issue Jun 19, 2018 · 3 comments · Fixed by #5880

Comments

@maxymczech
Copy link

Expected Behavior

I expect to see a single thin vertical line, regardless of screen/window size

Current Behavior

The line disappears on certain screens / window sizes.

Possible Solution

Sorry, no idea, this looks like some sort of rounding issue...

Steps to Reproduce (for bugs)

https://codepen.io/anon/pen/RJQPZZ
When the width of container is set to a certain width, e.g. 352px, the line disappears.

Context

How has this issue affected you? What are you trying to accomplish?
This issue made me sad. I am trying to be happy again.

Environment

  • Chart.js version: 2.7.2
@SimonLoir
Copy link

It doesn't seem to be a rounding issue because if it was rounded to 0, the graph would have been drawn anyway : when the borderwidth = 0, it seems like the graph is drawn as if the borderwidth was set.

I think it's an expected behaviour given that when the borderwidth is set to 0.15, the lines start to get smaller and nearly invisible.

@maxymczech
Copy link
Author

maxymczech commented Jun 20, 2018

Thank you for your answer. This cannot be expected behavior, because in this example it draws the line at 351 and 353px container width, but at 352px the line disappears. Also, on mobile devices / in chrome mobile mode it looks like this: https://image.ibb.co/hQAZ0J/Untitled_2.png
I.e. when in Desktop Chrome the line disappears, in Mobile Chrome with same conditions it renders a triangle instead of a thin line.

@SimonLoir
Copy link

Indeed, it's not an expected behavior at all, I was wrong.

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

Successfully merging a pull request may close this issue.

3 participants