faheem801 / flot

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

Flot r266 dual axis error: the 2nd y-axis displayed on left rather than right #417

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The second y-axis is displayed on the left of chart rather than right.

Flot version: r266
Browser: firefox 3.6.9, chromium 7.0.524 on ubuntu 10.04, IE 8 on windows

Attachment is the source code and screen shot.

Original issue reported on code.google.com by quan....@gmail.com on 15 Sep 2010 at 4:38

Attachments:

GoogleCodeExporter commented 9 years ago
I guess you need to specify the position of the second axis in the options, see 
under "Multiple axes" in the API.txt:

{
    xaxes: [ { position: "top" } ],
    yaxes: [ { }, { position: "right", min: 20 } ]
  }

Original comment by mila.bol...@gmail.com on 20 Oct 2010 at 3:03

GoogleCodeExporter commented 9 years ago
Yes, as Mila says, if you use the backwards compatibility code, the second axis 
will be on the right/top, otherwise it's now on the left.

This is intended to make it a bit easier to guess what happens when you 
add/remove axes now that there are support for more than two.

Original comment by olau%iol...@gtempaccount.com on 15 Dec 2010 at 4:02

GoogleCodeExporter commented 9 years ago
Thanks Mila and Olau, after adding "yaxes: [ {}, { position: "right" } ]," into 
options, now I can use the latest version of flot instead of flot 0.6. 

BTW, the zooming code using "plotselected" also need being changed accordingly 
to fit the new dual axis format, otherwise a "D is undefined" error will be 
reported.

Original comment by sunqua...@gmail.com on 15 Dec 2010 at 7:26

GoogleCodeExporter commented 9 years ago
Hm, it sounds like the backwards-compatibility code is still broken. Thought I 
had fixed it already.

Original comment by olau%iol...@gtempaccount.com on 17 Dec 2010 at 5:32

GoogleCodeExporter commented 9 years ago

Original comment by dnsch...@gmail.com on 4 Jun 2012 at 2:52