This question in partially related to my previous post on this subject.
I would like to know after a ChartPanel has been constructed :
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;
}
Can I retrieve the dataset used for generating chart, but having only a reference to chartPanel?
ChartPanel panel = buildChart();
panel.getDataset; //I'm looking for a way to retrieve the dataset, or XYSeriesCollection..
Is that possible? Can someone put me in the right direction?
thanks in advance