Hi all!
I just bought the jfreechart guide, and I haven't been able to find a way to set integer values in the scale. All the dial chart examples don't have integer values, so I don't know how to do this.
Thanks in advance.
integer scale in dial chart
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
You can set the formatting for the tick labels on the axis:
Note that the cast here assumes that the scale in your plot *is* an instance of StandardDialScale (it most likely is, but then it is also possible to create your own scale class).
Code: Select all
StandardDialScale s = (StandardDialScale) plot.getScale(0);
s.setTickLabelFormatter(NumberFormat.getIntegerInstance());
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

