I am trying to build a simple JFreeChart XYLineChart object, and embed it into a ChartPanel object.
For some unknown reason, the plot area doesn't look properly: You can see how gridlines are inconsistent in thickness, and the edges of the plot have these thick black markings in random places. What could be the cause of this?
public class Main extends JFrame() {
public static void main (String [] args) {
ECGPanel myECGPanel = new ECGPanel();
this.add(myECGPanel);
}
}
public class ECGPanel extends Jpanel {
lineChart= ChartFactory.createXYLineChart("ECG", "Time(ms)", "Voltage(mV)", dataset,
PlotOrientation.VERTICAL, true, false, false);
chartPanel=new ChartPanel(lineChart);
chartPanel.setPreferredSize(new Dimension(1000,400));
this.add(chartPanel);
}