Hi,
I want my Y-axis to be formatted Y-value %. I know I have to use NumberTickUnit, but I don't know how to create the NumberFormat that is nedded to create the NumberTickUnit object.
Thanks, Linh
How to customize what's displaying in the Y-axis
Re: How to customize what's displaying in the Y-axis
Try something like this:
XYPlot plot = myChart.getXYPlot();
NumberAxis axis = (NumberAxis)plot.getRangeAxis();
NumberTickUnit unit = new NumberTickUnit(1.0, new java.text.DecimalFormat("0.00%"));
axis.setTickUnit(unit);
Regards,
DG.
XYPlot plot = myChart.getXYPlot();
NumberAxis axis = (NumberAxis)plot.getRangeAxis();
NumberTickUnit unit = new NumberTickUnit(1.0, new java.text.DecimalFormat("0.00%"));
axis.setTickUnit(unit);
Regards,
DG.