0

trying to export a RingChart as png, I don't use title or legend, just the chart, still I have white space on the top and bottom:

creating via factory:

    JFreeChart chart = ChartFactory.createRingChart(
            null, 
            dataset, 
            false,
            false,
            false
    );

the following didn't help:

chart.setPadding(new RectangleInsets(0, 0, 0, 0));

RingPlot plot = (RingPlot) chart.getPlot();

plot.setInsets(new RectangleInsets(0, 0, 0, 0.0));

I need the chart to be without any margins for the exported image, any idea? Thanks

Doron Levi
  • 458
  • 4
  • 16

0 Answers0