1.介绍
代码语言:txt复制public LineChartExample(String title) {
super(title);
// Create dataset
DefaultCategoryDataset dataset = createDataset();
// Create chart
JFreeChart chart = ChartFactory.createLineChart(
"Site Traffic", // Chart title
"Date", // X-Axis Label
"Number of Visitor", // Y-Axis Label
dataset
);
ChartPanel panel = new ChartPanel(chart);
setContentPane(panel);
}