Answer the question
In order to leave comments, you need to log in
How to draw a running graph?
How to make a chart like this one? https://ru.expertoption.com/
I can just draw a graph, but how to make it move I can’t figure out how? Maybe there is a library or a ready solution?
Answer the question
In order to leave comments, you need to log in
Just like with html + css. The canvas has, conditionally, 500px width, and the graph layer has 2000px. We have drawn a layer with a graph, we start the animation of the shift along the X axis. We write the condition, if we have screwed it up to the end, we stop the animation.
https://jsfiddle.net/wjhn7qb4/ - like this. Of course, I didn’t write the stop condition, that’s not the point.
Specifically, it was done on canvas.
Well, read, see examples:
https://www.google.com/search?q=canvas+animation&o...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question