TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
-
crni
- Newbie
- Posts: 10
- Joined: Fri Nov 09, 2012 12:00 am
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
- Posts: 9613
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
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);
-
crni
- Newbie
- Posts: 10
- Joined: Fri Nov 09, 2012 12:00 am
Post
by crni » Fri Dec 14, 2012 8:20 am
That was it, works fine now.
Thank you.