Page 1 of 1

Right axis not visible

Posted: Thu Dec 13, 2012 3:04 pm
by 17064088
I cant get the right axis to be displayed. Left axis works fine using this:

Code: Select all

chart.getAxes().getLeft().setVisible(true);
chart.getAxes().getLeft().getGrid().setVisible(false);
But on right axis I tried all combinations of the following, still nothing appears:

Code: Select all

chart.getAxes().getRight().setVisible(true);
chart.getAxes().getRight().getGrid().setVisible(true);
chart.getAxes().getRight().getTicks().setVisible(true);
chart.getAxes().getRight().getLabels().setVisible(true);
chart.getAxes().getRight().getAxisPen().setVisible(true);
chart.getAxes().getRight().getTitle().setVisible(true)
How can I make the right axis to appear?

Re: Right axis not visible

Posted: Thu Dec 13, 2012 3:54 pm
by yeray
Hi,

Any axis needs a visible series, with visible points, assigned to it so it can be drawn.
Having one series, you can make both left and right axes visible with:

Code: Select all

tChart1.getSeries(0).setVerticalAxis(VerticalAxis.BOTH);

Re: Right axis not visible

Posted: Fri Dec 14, 2012 8:20 am
by 17064088
That was it, works fine now.
Thank you.