0
我创建的JFreeChart是一个LineChart。我遇到的问题是图表上的行未显示。Line在Netbeans IDE的LineChart上不显示
谁能告诉我为什么发生这种情况。
这里是按钮的代码:
DefaultCategoryDataset dataset2 = new DefaultCategoryDataset();
dataset2.setValue(100, "John B","EMP0001");
dataset2.setValue(200, "John A","EMP0003");
JFreeChart chart2 = ChartFactory.createLineChart("Comission", "Employee", "Number of Sales", dataset2, PlotOrientation.VERTICAL, false, true, true);
chart2.setBackgroundPaint(Color.YELLOW);
chart2.getTitle().setPaint(Color.RED);
CategoryPlot p2 = chart2.getCategoryPlot();
p2.setRangeGridlinePaint(Color.BLUE);
ChartFrame frame2 = new ChartFrame("Employee Comission", chart2);
frame2.setVisible(true);
frame2.setSize(450,350);
这是创建折线图时会发生什么:
Line chart without line displaying on chart
请会有人帮助刚刚指示我哪里可能问题在于。