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

Ticks and grid not scrolling #123

Closed
juliankigwana opened this issue Nov 12, 2020 · 7 comments
Closed

Ticks and grid not scrolling #123

juliankigwana opened this issue Nov 12, 2020 · 7 comments
Assignees
Milestone

Comments

@juliankigwana
Copy link

juliankigwana commented Nov 12, 2020

First let me say I'm very impressed with this plugin, it seems to have all the functionality I need.

I followed your React tutorial and the chart it produces does not have scrolling ticks or background grid lines. They only seem to update on the refresh interval, which results in the tick timestamps being updated in place. I have included a gif to help describe the issue as I my terminology might be off.

Nov-12-2020 17-25-54

This is what I expect to see:

Nov-12-2020 17-35-33

I tried removing the tick rotation, but this didn't make any difference to the scrolling. The tutorial says I should be able to just follow those steps, but there must be something else missing. Any help will be most appreciated. Thanks.

@juliankigwana
Copy link
Author

juliankigwana commented Nov 13, 2020

I did some digging around and discovered that PR #6241 was the commit inside of ChartJS that broke this functionality, so this has been broken for over a year now. I did try to fix it but I am not familiar enough with code base nor canvas to be able to get anywhere with it.

Would be good to get some eyes on this issue as using this plugin only works properly on Chartjs => 2.8.0

@nbyx
Copy link

nbyx commented Nov 14, 2020

Did you find a solution? @juliankigwana

@juliankigwana
Copy link
Author

juliankigwana commented Nov 16, 2020

Did you find a solution? @juliankigwana

No @nbyx, like I said, I was able to find the commit that caused the failure, but it's way over my expertise to fix it. I am currently trying to decide whether to give up on ChartJS find another library that has the same functionality (although Im struggling to find anything ), or switch use the older version ChartJS before it broke. If you know of any alternative solutions or libraries they would be most welcome.

@flieks
Copy link

flieks commented Mar 6, 2021

I am also having this issue. I think reverting to 2 year old version is not an option as i am using lots of chartjs (and react-chart-js) features

@flieks
Copy link

flieks commented Mar 6, 2021

If you take a realtime.duration of more then 60 secs. Like 200000 ms, then the ticks & lines move properly to the left. In my case i need a bigger range like 1 hour so kind of works. Although it moves not all vertical lines at the same time, but a few at a time by 1 px and then some others.

@nagix nagix self-assigned this May 10, 2021
@nagix nagix added this to the v1.9.0 milestone May 10, 2021
@nagix
Copy link
Owner

nagix commented May 10, 2021

Closing as the version 1.9.0 that supports Chart.js 2.9.x and fixes this issue was just released. You can also try the version 2.0.0-beta.2 that supports Chart.js 3.x.

@nagix nagix closed this as completed May 10, 2021
@BenWoodford
Copy link

I hate to bump a closed issue, but is there a way to actually get this behaviour to come back? I want my grid lines not to move as it's very jarring

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

5 participants