I want to access the current point in a progressive line chart in Chart JS using javascript, e.g log the current value of the line on the console every one second where the total duration of the animation is 20 seconds.
Is it possible to do it with setInterval? Or is there easier method which isn't as clumsy?
In fact you can set the interval same way ChartJS do the animation. So sneak into the animation delay definition you have and add some code. Please note that we may not set exact seconds to delay the output, but we may use delay interval for each dot, because:
Anyway you can do some calculations by yourserlf, or just expose one value for example every 100 points of chart data this way, look at bottom of the code:
You can check it on this Fiddle, or below: