Reset or clear chart

2,309 views
Skip to first unread message

Blair Jones

unread,
Nov 6, 2013, 9:39:42 AM11/6/13
to smoothi...@googlegroups.com
Hi and thanks for providing a great tool.

I am trying to reset or clear a chart after an event (ie. user selects a button) and restart from scratch (with the same chart or a new chart).  I've tried several things including creating new chart objects, clearing the context, clearing the save stack, setting old values to null, etc. but every time the chart restarts it starts from exactly where it was before.  What might I be missing or doing wrong?

Thanks, Blair

Drew Noakes

unread,
Nov 7, 2013, 9:07:54 AM11/7/13
to smoothie-charts
Hi Blair,

You can clear the series by setting the data property to a new array.

I created an example here: http://jsfiddle.net/drewnoakes/sjSy6/

Drew.


--
You received this message because you are subscribed to the Google Groups "Smoothie Charts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothie-char...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages