public static JPanel createCustomDemoPanel(Map<String, Double> map) { // set model DefaultPieDataset defaultpiedataset = new DefaultPieDataset(); for (String key : map.keySet()) { defaultpiedataset.setValue(key, map.get(key)); } // assign to view JFreeChart jfreechart = createChart(createDataset()); Rotator rotator = new Rotator((PiePlot3D) jfreechart.getPlot()); rotator.start(); return new ChartPanel(jfreechart); }
public static JPanel createDemoPanel() { JFreeChart jfreechart = createChart(createDataset()); Rotator rotator = new Rotator((PiePlot3D) jfreechart.getPlot()); rotator.start(); return new ChartPanel(jfreechart); }