Search code examples
jfreechart

CategoryAxis TickLabels margin jFreeChart


I want to have something like this on xAxis(CategoryAxis) tick labels with jFreechart How do I achieve this ?

 |
 |
 +----------+------------------+----

                                                --> margin

         India                 China     

Thanks in advance.


Solution

  • You could use the setTickLabelInsets() method to put a margin at the top of the tick labels.