youcef92 / flotr

Automatically exported from code.google.com/p/flotr
0 stars 0 forks source link

reading x/yaxis.min and x/yaxis.max #107

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Not really a defect or an enhancement request...

Could someone please tell me how I can read (get) as well as set x and y
axis mins and maxes (for the graph as a whole, not just a series)? I've
tried a number of syntax variations but cannot seem to stumble upon the
right combination.

I need to know as I'm doing zoom-with-preview as per
http://phenxdesign.net/projects/flotr/examples/prototype/mouse-zoom-preview.html
,
but also turning series, lines, etc. on/off via user input, and would like
to maintain the current zoom when I change other options.

I'd think it should be as easy as:

var xMin = xaxis.min

but ... ?

Thanks in advance!

Original issue reported on code.google.com by planetsc...@gmail.com on 11 Dec 2009 at 2:53

GoogleCodeExporter commented 8 years ago
Nevermind. ;-)

I figured it out.

...
var f = drawGraph();
var a = f.axes;
var xMin = a.x.min;
var xMax = a.x.max;
var yMin = a.y.min;
var yMax = a.y.max;
...

gets me where I need to be.

Thanks anyway!

Original comment by planetsc...@gmail.com on 13 Dec 2009 at 1:03

GoogleCodeExporter commented 8 years ago

Original comment by peter....@solide-ict.nl on 22 Jun 2010 at 1:28