TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
-
Eliana
- Newbie
- Posts: 16
- Joined: Tue May 06, 2014 12:00 am
Post
by Eliana » Thu May 15, 2014 10:37 am
Hi,
I’m using Teechart Java Android source code v3.2013.1219.
I’m using the following code to set a logarithmic axis on the circular gauge but it still gives me a linear scale.
Code: Select all
circularGauge = new CircularGauge(chart.getChart());
circularGauge.setMinimum(0);
circularGauge.setMaximum(512);
circularGauge.getVertAxis().setLogarithmic(true);
circularGauge.getVertAxis().setLogarithmicBase(2.0);
circularGauge.getVertAxis().setIncrement(1);
Do I need to use something else to enable the logarithmic axis or the CircularGauge does not support such functionality?
Thank you in advance.
-
Yeray
- Site Admin
- Posts: 9613
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Thu May 15, 2014 2:18 pm
Hello,
I've added it to the tracker to be implemented in future releases:
http://bugs.teechart.net/show_bug.cgi?id=771
Feel free to add your mail account to the CC list to be automatically notified when an update arrives.
-
Eliana
- Newbie
- Posts: 16
- Joined: Tue May 06, 2014 12:00 am
Post
by Eliana » Thu May 15, 2014 2:49 pm
Thanks for the feedback.
Btw, do bars and line charts support logarithmic axis?
-
Yeray
- Site Admin
- Posts: 9613
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Fri May 16, 2014 7:30 am
Hello,
Yes, take a look at the following code:
Code: Select all
Bar bar1 = new Bar(tChart1.getChart());
bar1.fillSampleValues();
try {
tChart1.getAxes().getLeft().setLogarithmic(true);
} catch (ChartException ex) {
Logger.getLogger(ChartJFrame.class.getName()).log(Level.SEVERE, null, ex);
}
This is how it looks the chart after running the above:
- 2014-05-16_0930.png (11.98 KiB) Viewed 14156 times
-
Eliana
- Newbie
- Posts: 16
- Joined: Tue May 06, 2014 12:00 am
Post
by Eliana » Mon May 19, 2014 5:59 am
Great, thanks for the example.