Also be aware that the animation for newly added values is different than for a constant number of values which move form the right to the left. My workaround solves this, but the values do not move from right to left, but instead each value transforms form the old to the new value, which is better than the white area, but not that good for a live chart that constantly gets new [email protected] how did you change the color to red if they're clicked?So I'd like to update chart whenever a new data point is available. I just don't know how to achieve this via this wrapper.
In your component: Spend several hours testing other workarounds, and thought this might help someone (it also seems a lot more straight-forward w/o need for adding any new imports).
It's not a solution for later updates, but it's definitely a solution for a lot of the people that seem to have stumbled on this and the similar topics posted above that just want their chart initialized properly. It updates the chart lines according to new data without redrawing the whole chart.
With that done, and your watchlists for each and every database now organised to perfection, you might now be wondering: “How can I fuck it all up completely in the minimum amount of time? Well then have I got the perfect Perl script for you!
(Because nothing has the power to mess up perfectly good data like a poorly written Perl script! Regardless of programming language, any determinedly incompetent programmer could no doubt write a script to neatly screw up data and/or sanity with a simple command line execution.
However, it only goes back if I hover my mouse over the old point.
I would like this behavior to be automatic - I would imagine that calling update on the chart would work, but I get the error: in my case I'm trying to display a realtime chart.
I was having some serious problems getting the chart to properly initialize, and none of these solutions worked straight forward (data was being loaded async, but the chart would draw before the process finished and wouldn't re-render).
A quick, easy, solution is to just wait to draw the canvas until your asyncs are finished.
Refresh is only called when user clicks a button, or programmatically when i'm sure new data is there. You should even be able to view the graph in real time if you run the app.
https://github.com/adadgio/angular-garden a new one, then the animation works with the code I posted above only. Would be good if the last value moves out of the scale.
So you can manually trigger the change detection like the ways provided in this post, or give a different reference.