0

I am working with JFreeChart in java in order to show some charts. I want to make the value in the X axis vertical to save the space between two dots in the chart ( line chart ).

The picture below shows what i mean:

enter image description here

Thanks

copeg
  • 8,290
  • 19
  • 28
steevn
  • 242
  • 2
  • 8

1 Answers1

0

Try it:

...
XYDataset dataset = createDataset();
JFreeChart chart = createChart(dataset);
CategoryAxis categoryAxis = chart.getCategoryPlot().getDomainAxis();
categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
// categoryAxis.setVerticalTickLabels(true);
...