Right axis not visible

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
crni
Newbie
Newbie
Posts: 10
Joined: Fri Nov 09, 2012 12:00 am

Right axis not visible

Post by crni » Thu Dec 13, 2012 3:04 pm

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?

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Right axis not visible

Post by Yeray » Thu Dec 13, 2012 3:54 pm

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);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

crni
Newbie
Newbie
Posts: 10
Joined: Fri Nov 09, 2012 12:00 am

Re: Right axis not visible

Post by crni » Fri Dec 14, 2012 8:20 am

That was it, works fine now.
Thank you.

Post Reply