githiro / drawDoughnutChart

A SVG doughnut chart with animation and tooltip.
http://codepen.io/githiro/details/ICfFE
88 stars 40 forks source link

Ability to change values dynamically and have the chart animate in real time #4

Open kevinnal opened 9 years ago

kevinnal commented 9 years ago

We are using SignalR and would like to update chart dynamically when values are changed from server side. Ideally chart will be constantly changing (some values will change and chart has to reflect this in real time) and animation will simply adjust color sections according to value changes.

One could simply have a textbox with number input which will update certain value and will see animated change take place.

Is this possible with current js? if not what is the effort to accomplish this.

Thanks in advance!

pre2612 commented 8 years ago

I achieved this using angular creating a scope function and calling that function in view to create chart. everytime data changes view (chart) gets regerated

pre2612 commented 8 years ago

even with jquery this should be possible. create a function with all the changes you want when data changes. you can watch data change and call the function. Remove html inside that element and recreate it