List of usage examples for org.jfree.chart ChartPanel setFillZoomRectangle
public void setFillZoomRectangle(boolean flag)
From source file:org.hxzon.demo.jfreechart.XYDatasetDemo2.java
public XYDatasetDemo2(String title) { super(title); ChartPanel chartPanel = new ChartPanel(timeSeriesChart); //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 w w .j a v a2 s.co m*/ getContentPane().add(new ChartComboBox(chartPanel), BorderLayout.SOUTH); }
From source file:org.hxzon.demo.jfreechart.OtherDatasetDemo.java
public OtherDatasetDemo(String title) { super(title); ChartPanel chartPanel = new ChartPanel(bubbleChart); //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 w w . ja v a2 s. com getContentPane().add(new ChartComboBox(chartPanel), BorderLayout.SOUTH); }
From source file:net.sf.maltcms.common.charts.api.XYChartBuilder.java
/** * Creates a new ContextAwareChartPanel instance. * @return the chart panel/*w w w . j av a 2s . com*/ */ public ChartPanel buildPanel() { chart.setRenderingHints(renderingHints); chartTheme.apply(chart); ChartPanel chartPanel = new ContextAwareChartPanel(chart, preferredWidth, preferredHeight, minimumWidth, minimumHeight, maximumWidth, maximumHeight, chartPanelBuffer, chartPanelProperties, chartPanelSave, chartPanelPrint, chartPanelZoom, chartPanelToolTips); chartPanel.setMouseWheelEnabled(true); chartPanel.setFillZoomRectangle(true); chartPanel.setDoubleBuffered(true); chartPanel.setZoomOutlinePaint(ChartCustomizer.withAlpha(Color.DARK_GRAY, 1.0f)); chartPanel.setZoomFillPaint(ChartCustomizer.withAlpha(Color.WHITE, 0.6f)); return chartPanel; }
From source file:org.hxzon.demo.jfreechart.CategoryDatasetDemo2.java
public CategoryDatasetDemo2(String title) { super(title); ChartPanel chartPanel = new ChartPanel(barChart); //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);/*ww w . jav a2 s. co m*/ getContentPane().add(new ChartComboBox(chartPanel), BorderLayout.SOUTH); }
From source file:org.jfree.chart.demo.ContourPlotDemo2.java
/** * Constructs a new demonstration application. * * @param title the frame title./*from w w w.ja v a2 s . com*/ */ public ContourPlotDemo2(final String title) { super(title); final JFreeChart chart = createContourPlot(); final ChartPanel panel = new ChartPanel(chart, true, true, true, true, true); panel.setPreferredSize(new java.awt.Dimension(1000, 800)); panel.setMaximumDrawHeight(100000); //stop chartpanel from scaling panel.setMaximumDrawWidth(100000); //stop chartpanel from scaling // panel.setHorizontalZoom(true); // panel.setVerticalZoom(true); panel.setFillZoomRectangle(true); setContentPane(panel); }