You could use XChart for this, as exporting Charts
in high-res at a certain DPI is a new feature since version 2.2.0. The code would look something like this:
double[] xData = new double[] { 0.0, 1.0, 2.0 };
double[] yData = new double[] { 2.0, 1.0, 0.0 };
// Create Chart
Chart chart = QuickChart.getChart("Sample Chart", "X", "Y", "y(x)", xData, yData);
// Show it
new SwingWrapper(chart).displayChart();
// Save it
BitmapEncoder.savePNG(chart, "./Sample_Chart.png"); // default 72 DPI
BitmapEncoder.savePNGWithDPI(chart, "./Sample_Chart_300_DPI.png", 300);
Disclaimer: I'm the lead developer of XChart. I recently faced the exact same problem as you. I needed charts at 300 DPI for a scientific publication. Feedback is welcome!