Search code examples
jfreechart

Bold x axis values in jfreechart


How can I bold the x and y axis values in jfreechart?


Solution

  • Have you tried one of those:

    yourAxis.setTickLabelFont(new Font("Arial", Font.BOLD, 10)); //to define a specific font
    

    or

    Font bold = yourAxis.getTickLabelFont().deriveFont(Font.BOLD);
    yourAxis.setTickLabelFont(bold); //to use the existing font, but bold