【发布时间】:2011-08-24 08:59:59
【问题描述】:
这个问题与my previous post 部分相关。
我想知道 ChartPanel 构建完成后:
public ChartPanel buildChart(){
XYSeriesCollection dataset = new XYSeriesCollection();
...
FreeChart chart = ChartFactory.createXYLineChart("line chart example",
"X", "Y", dataset, PlotOrientation.VERTICAL, true, true, false);
ChartPanel chartPanel = new ChartPanel(chart);
return chartPanel;
}
我可以检索用于生成图表但仅引用 chartPanel 的数据集吗?
ChartPanel panel = buildChart();
panel.getDataset; //I'm looking for a way to retrieve the dataset, or XYSeriesCollection..
这可能吗?有人能把我引向正确的方向吗?
提前致谢
【问题讨论】:
标签: java dataset jfreechart