gionkunz / chartist-plugin-threshold

Threshold Plugin for Chartist.js
Do What The F*ck You Want To Public License
29 stars 38 forks source link

Reinitialize plugin or live change propperties (threshold) #9

Open vit134 opened 7 years ago

vit134 commented 7 years ago

Hi, in my app, i show new chart with different propperties on timeout, and i want any time when chart was created, change the "threshold" prop. how i can do this? You can see my app in http://widgets.andryushkov.ru/exchange_dynamics/

Thankful in advance for the answer

adriennn commented 7 years ago

I tried to do this as well, users can change the threshold from a form, but I can't figure out how to pass the new options to the .update() function of chartist-js to update the graph with the new threshold?

chart.update(null, {c.plugins.ctThreshold: threshold})