Yopadd / vue-chartist

Pluging chartist for vuejs
Do What The F*ck You Want To Public License
172 stars 21 forks source link

update() #12

Closed AngryElephant closed 8 years ago

AngryElephant commented 8 years ago

Chartist has an update method https://gionkunz.github.io/chartist-js/api-documentation.html#chartistbase-function-update

Just wonder why it's not used in this component instead of redraw everything each time the data change ?

Yopadd commented 8 years ago

Hi,

I tested your proposal. With update method it's not possible to redraw a chart with a new type (Pie, Line, Bar). But with two methods : draw (for type property) and redraw (for other propertys) it's possible and this is certainly more performance.

Thanks for your proposal :)

AngryElephant commented 8 years ago

Hello,

Yes if we don't want to transform a Line in Pie or Bar but just update the chart with new data (series, labels) or even options. The update() method can be useful :)

Thanks for your answer.