Hi,
Please could you let me know as to how I can change the font size and type of the Y axis tick. I am new to using the JFreeCharts so may be there is something Im missing on here.
Thanks,
Sumit
Font Size and type of the Y axis Tick
Re: Font Size and type of the Y axis Tick
You can change the font size and the tick size like this:
CategoryPlot plot = myChart.getCategoryPlot();
NumberAxis axis = (NumberAxis)plot.getRangeAxis();
Font font = new Font("SansSerif", Font.PLAIN, 10); // change to whatever you want
axis.setTickLabelFont(font);
axis.setTickUnit(new NumberTickUnit(5.0, new DecimalFormat("0.00")));
Regards,
DG
CategoryPlot plot = myChart.getCategoryPlot();
NumberAxis axis = (NumberAxis)plot.getRangeAxis();
Font font = new Font("SansSerif", Font.PLAIN, 10); // change to whatever you want
axis.setTickLabelFont(font);
axis.setTickUnit(new NumberTickUnit(5.0, new DecimalFormat("0.00")));
Regards,
DG
Re: Font Size and type of the Y axis Tick
In what package can I find the DecimalFormat class?