n3-charts / line-chart

Awesome charts for AngularJS.
http://n3-charts.github.io/line-chart/
MIT License
1.2k stars 180 forks source link

[Question]If I want to update the chart data, based on the timeline, what should I do? #539

Closed wu-sheng closed 7 years ago

wu-sheng commented 7 years ago

Hi, I want to use line-chart as a part of sky-walking APM UI. As an application performance management, we always should charts based on time line, it is some charts like http://n3-charts.github.io/line-chart/#/examples#time_series. But these did not show how to do when data updated, as time changed.

Let's say if we get data at first time, the data is between 14:00 - 15:00; and the second time, the data is between 14:02-15:02. We want to update the chart, but do not want to refresh the page.

I think you definitely support this feather, but I did not find the examples and docs, yet. Can you guys give me some guides?

chaosmail commented 7 years ago

Hi @wu-sheng line-chart is supporting this, just update $scope.data, bind it to n3-charts (see the examples) and everything in there will be automatically updated in the chart. Hope that helps! Best, Christoph