grofit / aurelia-chart

A chart element for aurelia which is powered by chart js using html5 canvas.
MIT License
46 stars 25 forks source link

Reanimate Chart without Data Update #37

Closed ndzeller closed 6 years ago

ndzeller commented 6 years ago

Is there a way to reanimate the chart based off of an event even if no data is updated?

grofit commented 6 years ago

not sure, does ChartJS expose it?

grofit commented 6 years ago

Ah that makes more sense, erm you shoudl be able to basically re-initialize it, as behind the scenes it just listens for changes then I think it destroys and recreates it. So you may be able to expose some sort of hook from the binding/directive to let you manually trigger the recreation logic.

ndzeller commented 6 years ago

That worked! Thanks @grofit . When I re-initialized the data it updated as desired.

grofit commented 6 years ago

this was the best issue ever then :)

ndzeller commented 6 years ago

Agreed :) thanks for creating aurelia-chart!