shutterstock / rickshaw

JavaScript toolkit for creating interactive real-time graphs
https://shutterstock.github.io/rickshaw
MIT License
6.53k stars 939 forks source link

Change Ajax data file and redraw graph #80

Closed dmnxprss closed 12 years ago

dmnxprss commented 12 years ago

Hey,

Im currently using the Ajax graph to view some results, but since I have several files to view I want to be able to switch between each using a drop down menu and redraw the graph and axis

Is this possible? How would i go about doing this?

Thanks in advance

dchester commented 12 years ago

The easiest, most straightforward way to do this is to instantiate a new Rickshaw.Graph.Ajax object on the 'change' event of the select. Essentially, just start over each time a new value is selected. There are more efficient, more complicated ways, but maybe start there.