Hello, is it possible to change the axis values in own definded string values?
For example convert y value 1 to own defined String1 y value 2 to own definded String2 and so on?
Change axis values to string
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Yes, another developer wrote the SymbolAxis class for that very purpose.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


I did the same thing overriding the numbertickunit.
Basically override the "valueToString(double d)" function in there and have it output the string you are looking for.
Then I create a new TickUnits object and load it up with the new NumberTickUnit that I created for the values I want displayed and then set that TickUnits object to the TickUnits on the axis (Range in my case) that I want those for.
My code examples will probably not fit you, as my valueToStrings are received from another object I already have.
Seems to work just fine.
Dan
Basically override the "valueToString(double d)" function in there and have it output the string you are looking for.
Then I create a new TickUnits object and load it up with the new NumberTickUnit that I created for the values I want displayed and then set that TickUnits object to the TickUnits on the axis (Range in my case) that I want those for.
My code examples will probably not fit you, as my valueToStrings are received from another object I already have.
Seems to work just fine.
Dan