Hello,
I like to avoid that that the numbers displayed in the charts have thousands separators (like 3,000.0, it should look like this 3000.0).
I am looking for a general setting that dont affect the (usually) smart auto formatting of numbers in charts.
I am working with Locale.US. One idea was to change the settings of locale, but I didt find a way to get my result ("." for decimal separators and nothing for thousands separators).
Anyone has an idea?
Chris
Avoid thousands separator
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Avoid thousands separator
You could take the NumberTickUnitSource class and change this line:
...to remove the thousands separator. Basically copy and paste the class to a new one called MyNumberTickUnitSource...then set the tick unit source on your axis to an instance of this class. Not the nicest solution, but it would work.
Code: Select all
private DecimalFormat df0 = new DecimalFormat("#,##0");
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program