youcef92 / flotr

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

Enhancement request: allow axes to display on both top/bottom and/or right/left #101

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
For a project I am working on, a very useful enhancement would be to permit
the x axis to display on BOTH top and bottom, and the y axis to appear on
both left and right sides.

Yes, I know one can display the x and y axes per series on left or right,
bottom or top, respectively, but would prefer this to also be a global
option, if that makes sense, in particular because I need to be able to
selectively turn series on/off.

Thanks in advance!

planetscape

Original issue reported on code.google.com by planetsc...@gmail.com on 1 Dec 2009 at 9:10

GoogleCodeExporter commented 8 years ago
Hello, 
I think I understood that you would like to have the same X axis on both left 
and right 
(and sams Y axis on top/bottom). You can do this by setting xaxis:1 on a 
series, and 
xaxis:2 on the other series. For these axes to be the same, you need to set the 
same 
min and max to the axis options.

Original comment by fabien.menager on 5 Dec 2009 at 3:21

GoogleCodeExporter commented 8 years ago
Hi. Thanks for your prompt response.

Yes, this is what I would like, same X axis on right/left, same Y on top/bottom.

The problem I see with your solution is that I use a modification of the 
technique
here: http://people.iola.dk/olau/flot/examples/turning-series.html (using
flot/jQuery), and may only have one series being displayed (or a variable number
depending on user input). 

However, if I am not understanding something, please correct me. :-)

Thanks!

Original comment by planetsc...@gmail.com on 10 Dec 2009 at 4:35

GoogleCodeExporter commented 8 years ago
I am also interested in this issue, I was looking at how hard it would be to add
multiple y axes for plotting many different sorts of data together and as I see 
it
the biggest issue is upgrading the axis labeling code to handle drawing multiple
scales on one side. The code is already pretty well factored for the specific 
change
asked for here. Each of the "rendering" blocks for the labels already have the 
axis
they are operating on pulled out, its just a question of adding the options to 
set
which axis should be displayed in which place. ( I think an axis.position: 
primary,
secondary, both would suffice for this). It looks like the only other part of 
the
code that would need to be updated would be the code that adds offsets to 
bottom,
top, left, right for each of the labels. That change should be relativley easy 
as
well (if you sort the axes by which place they want to be displayed). If this 
is done
correctly it get us 90% of the way there for adding many axes to plot. We would 
just
need to add code to allow rendering of multiple axis labels on each edge.

Original comment by sam.hend...@gmail.com on 16 Dec 2009 at 6:09