Hello
I upgraded to .9.11 from .9.6 and the move was fairly straightforward.
I was using VerticalSymbolicAxis for my Y axis and used a String[] to display values instead of numeric values.
String [] data;
m_rangeAxis = new VerticalSymbolicAxis(RANGEAXIS_TITLE, data);
In .9.11 I moved to
m_rangeAxis = new SymbolicAxis(RANGEAXIS_TITLE, data);
and the Y axis displays numeric values - 0,1,2,3, 4 instead of my strings.
Reading the SymbolicValues returns the correct String array but the display isnt working.
String[] test = m_rangeAxis.getSymbolicValue();
Any thoughts on what Im missing ? Help appreciated.
Thanks
Question on SymbolicAxis
Hi,
this is an breakage already reported by me. It has benn fixed in CVS.
Refer the reply in below link,
http://www.jfree.org/phpBB2/viewtopic.php?p=15420#15420
S.Karthick
this is an breakage already reported by me. It has benn fixed in CVS.
Refer the reply in below link,
http://www.jfree.org/phpBB2/viewtopic.php?p=15420#15420
S.Karthick
-
- Posts: 2
- Joined: Wed Aug 27, 2003 1:52 am
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
This is the fix:
http://cvs.sourceforge.net/cgi-bin/view ... 1.6&r2=1.7
It was just the method signature hadn't been updated to reflect changes elsewhere.
http://cvs.sourceforge.net/cgi-bin/view ... 1.6&r2=1.7
It was just the method signature hadn't been updated to reflect changes elsewhere.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


The SymbolicAxis isn't quite fixed - there seems to be a lot of overlapping code with NumberAxis that hasn't been properly updated. This means that the SymbolicAxis ignores any axis-offset in the plot, resulting in its text overlapping the axis line/ticks if any axis offset is used.
The quick'n' dirty fix is to copy the refreshTicksHorizontal/refreshTicksVertical from NumberAxis, and replace the
with
This also allows you to remove the refreshTicks() override completly.
Now, a prettier solution would be to introduce an overridable method in NumberAxis wrapping the replaced line... would reduce the amount of copy-paste code in SymbolicAxis.
The quick'n' dirty fix is to copy the refreshTicksHorizontal/refreshTicksVertical from NumberAxis, and replace the
Code: Select all
tickLabel = getTickUnit().valueToString(currentTickValue);
Code: Select all
tickLabel = valueToString(currentTickValue);
Now, a prettier solution would be to introduce an overridable method in NumberAxis wrapping the replaced line... would reduce the amount of copy-paste code in SymbolicAxis.