- JFreeChart chart = ChartFactory.createXYLineChart(
- "Height Profile",
- "Distance(km)",
- "Height(m)",
- dataset,
- PlotOrientation.VERTICAL,
- true,
- true,
- false);
- ChartUtilities.writeChartAsJPEG(aStream, chart, aWidth, aHeight);
+ JFreeChart chart = ChartFactory.createXYLineChart("Height Profile",
+ "Distance(km)", "Height(m)", dataset, PlotOrientation.VERTICAL,
+ true, true, false);
+ chart.setBackgroundPaint(Color.WHITE);
+ ChartUtilities.writeChartAsPNG(aStream, chart, aWidth, aHeight);