List of usage examples for org.jfree.chart PolarChartPanel PolarChartPanel
public PolarChartPanel(JFreeChart chart)
From source file:org.jfree.chart.demo.PolarChartDemo.java
/** * Creates a new instance of the demo./*from www . j a va2 s. c o m*/ * * @param title the frame title. */ public PolarChartDemo(final String title) { super(title); final XYDataset dataset = createDataset(); final JFreeChart chart = createChart(dataset); final ChartPanel chartPanel = new PolarChartPanel(chart); chartPanel.setPreferredSize(new Dimension(500, 270)); chartPanel.setEnforceFileExtensions(false); setContentPane(chartPanel); }
From source file:org.hxzon.demo.jfreechart.PolarChartDemo.java
public PolarChartDemo(String title) { super(title); PolarChartPanel chartPanel = new PolarChartPanel(polarChart1); //have a bug after show tooltips // chartPanel.setHorizontalAxisTrace(true); // chartPanel.setVerticalAxisTrace(true); chartPanel.setFillZoomRectangle(true); chartPanel.setMouseWheelEnabled(true); chartPanel.addMouseListener(new MyChartClickHandler(chartPanel)); chartPanel.setPreferredSize(new Dimension(500, 270)); getContentPane().add(chartPanel);//from w ww . ja v a 2 s . c o m getContentPane().add(new ChartComboBox(chartPanel), BorderLayout.SOUTH); Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { addValue(); } }, 0, 200); }