Example usage for org.jfree.chart PolarChartPanel setPreferredSize

List of usage examples for org.jfree.chart PolarChartPanel setPreferredSize

Introduction

In this page you can find the example usage for org.jfree.chart PolarChartPanel setPreferredSize.

Prototype

@BeanProperty(preferred = true, description = "The preferred size of the component.")
public void setPreferredSize(Dimension preferredSize) 

Source Link

Document

Sets the preferred size of this component.

Usage

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);/*w ww  .j  a v a2 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);
}