This question is partially related to my previous post on this topic.
I would like to know after creating a 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; }
Is it possible to get a dataset used to create a chart, but with only a link to chartPanel?
ChartPanel panel = buildChart(); panel.getDataset;
Is it possible? Can someone put me in the right direction?
early
source share