TanTayBui / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Update Graph Options Dynamically #707

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,
I need to change the graph X ans Y axis max, min, and tickSize dynamically. but 
it doesn't work.

Example:

   plot1.getOptions().xaxis.tickSize = 10;
   plot1.getOptions().yaxis.tickSize = 5000;
   plot1.setData([graphData]);
   plot1.setupGrid();
   plot1.draw();

Thanks

Original issue reported on code.google.com by hanyliou...@gmail.com on 24 Jun 2012 at 11:06

GoogleCodeExporter commented 9 years ago
This is really a question for the forums at 
https://groups.google.com/forum/?fromgroups#!forum/flot-graphs.  The issue 
tracker is only for confirmed bugs or feature requests, not questions.

But I'll give you the answer anyway; instead of using getOptions, use getAxes 
to iterate over the axes, then set axis.options... instead.

Original comment by dnsch...@gmail.com on 10 Jul 2012 at 11:35