Polar chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
avirutha
Posts: 8
Joined: Mon Sep 24, 2007 7:19 am

Polar chart

Post by avirutha » Wed Jan 16, 2008 8:23 am

By default the zero in polar axis starts from north and increase clockwise.I have the requirement such that zero in polar axis should start from south or from the position i specify.is there any way to do it.

matinh
Posts: 483
Joined: Fri Aug 11, 2006 10:08 am
Location: Austria

Post by matinh » Wed Jan 16, 2008 10:07 am

Hi!

I'm afraid this is not possible at the moment. The good news is you can fix it rather easily by subclassing org.jfree.chart.plot.PolarPlot and overriding translateValueThetaRadiusToJava2D(). This would be a nice enhancement, so maybe you could provide a patch if you implement it.

hth,
- martin

avirutha
Posts: 8
Joined: Mon Sep 24, 2007 7:19 am

Post by avirutha » Tue Jan 22, 2008 11:27 am

When we modify the angledegrees in translateValueThetaRadiusToJava2D
we were able to rotate the chart .but radial grid lines are not displayed properly .Can anyone help on this

matinh
Posts: 483
Joined: Fri Aug 11, 2006 10:08 am
Location: Austria

Post by matinh » Tue Jan 22, 2008 12:13 pm

Which renderer are you using?

DefaultPolarItemRenderer uses the method PolarPlot.translateValueThetaRadiusToJava2D() to translate the tick values to the coresponding coordinates. So if you modify this method, axis as well as data should be drawn on different positions.

- martin

Locked