List of usage examples for org.jfree.chart ChartPanel ChartPanel
public ChartPanel(JFreeChart chart, boolean useBuffer)
From source file:com.jaxzin.iraf.demo.CdfInv.java
public static void main(String[] args) { final JFreeChart chart = ChartFactory.createLineChart("Inverse CDF", "", "", createData(400), PlotOrientation.VERTICAL, true, true, true); // Customize the chart customizeChart(chart);/*from w w w.ja v a 2 s.c om*/ final JPanel panel = new ChartPanel(chart, true); final JFrame frame = new JFrame("Demo"); frame.getContentPane().add(panel); setupJFrame(frame); }
From source file:com.jaxzin.iraf.demo.Main.java
public static void main(String[] args) { final JFreeChart chart = ChartFactory.createHistogram("Probability of Values", "Value", "Probability", createData(COUNT), PlotOrientation.VERTICAL, false, true, true); // Customize the chart customizeChart(chart);/*from w ww. j av a 2 s . c o m*/ final JPanel panel = new ChartPanel(chart, true); final JFrame frame = new JFrame("Demo"); frame.getContentPane().add(panel); setupJFrame(frame); java.util.Timer t = new java.util.Timer(); t.schedule(new DataUpdater(chart), DELAY, DELAY); }
From source file:com.jaxzin.iraf.demo.GSDemo.java
public static void main(String[] args) { final JFreeChart chart = ChartFactory.createTimeSeriesChart("Timeseries", "", "", createData(), false, true, true);/* w ww .j ava 2 s . c om*/ // Customize the chart customizeChart(chart); final JPanel panel = new ChartPanel(chart, true); final JFrame frame = new JFrame("Demo"); frame.getContentPane().add(panel); setupJFrame(frame); }
From source file:org.lmn.fc.frameworks.starbase.plugins.observatory.ui.tabs.charts.ChartPanelFactory.java
/*********************************************************************************************** * Place a Chart on a configured JPanel. * The ChartPanel is returned to allow access to sizing etc. * * @param chart//from w ww.j a v a 2 s . co m * * @return ChartPanel */ public static ChartPanel createChartPanel(final JFreeChart chart) { final String SOURCE = "ChartPanelFactory.createChartPanel() "; final ChartPanel chartPanel; chartPanel = new ChartPanel(chart, true); chartPanel.setMaximumDrawWidth(2000); chartPanel.setMaximumDrawHeight(2000); return (chartPanel); }
From source file:org.jfree.chart.demo.BarChartDemo11.java
public BarChartDemo11(String s) { super(s);//from w ww . j ava 2 s .c om CategoryDataset categorydataset = createDataset(); JFreeChart jfreechart = createChart(categorydataset); ChartPanel chartpanel = new ChartPanel(jfreechart, false); chartpanel.setPreferredSize(new Dimension(500, 270)); setContentPane(chartpanel); }
From source file:org.jfree.chart.demo.TimeSeriesDemo14.java
public TimeSeriesDemo14(String s) { super(s);/* ww w . j a v a2 s. c om*/ XYDataset xydataset = createDataset(); JFreeChart jfreechart = createChart(xydataset); ChartPanel chartpanel = new ChartPanel(jfreechart, false); chartpanel.setPreferredSize(new Dimension(500, 270)); chartpanel.setMouseZoomable(true, false); setContentPane(chartpanel); }
From source file:org.jfree.chart.demo.TimeSeriesDemo1.java
public TimeSeriesDemo1(String s) { super(s);// w ww .j a va 2s. c o m XYDataset xydataset = createDataset(); JFreeChart jfreechart = createChart(xydataset); ChartPanel chartpanel = new ChartPanel(jfreechart, false); chartpanel.setPreferredSize(new Dimension(500, 270)); chartpanel.setMouseZoomable(true, false); setContentPane(chartpanel); }
From source file:org.nbrcp.demo.core.views.Scatterplot.java
private void setUpView() { JFreeChart chart = ChartFactory.createScatterPlot("", "X", "Y", Data.getDataset()); XYPlot plot = (XYPlot) chart.getPlot(); Shape dotShape = new Ellipse2D.Double(0, 0, 5, 5); XYItemRenderer renderer = plot.getRenderer(); renderer.setSeriesShape(0, dotShape); final ChartPanel panel = new ChartPanel(chart, true); panel.setMinimumDrawHeight(10);/*from www . j av a2s .co m*/ panel.setMaximumDrawHeight(2000); panel.setMinimumDrawWidth(10); panel.setMaximumDrawWidth(2000); panel.setSize(this.getSize()); this.add(panel); }
From source file:org.jfree.chart.demo.StackedBarDemo1.java
public StackedBarDemo1(String s) { super(s);// w w w .j a v a 2s. c om DefaultCategoryDataset defaultcategorydataset = new DefaultCategoryDataset(); defaultcategorydataset.addValue(1.0D, "Row 1", "Column 1"); defaultcategorydataset.addValue(5D, "Row 1", "Column 2"); defaultcategorydataset.addValue(3D, "Row 1", "Column 3"); defaultcategorydataset.addValue(2D, "Row 2", "Column 1"); defaultcategorydataset.addValue(3D, "Row 2", "Column 2"); defaultcategorydataset.addValue(2D, "Row 2", "Column 3"); org.jfree.chart.JFreeChart jfreechart = ChartFactory.createStackedBarChart("StackedBarDemo1", "Category", "Value", defaultcategorydataset, PlotOrientation.VERTICAL, true, true, false); ChartPanel chartpanel = new ChartPanel(jfreechart, false); chartpanel.setPreferredSize(new Dimension(500, 270)); setContentPane(chartpanel); }
From source file:org.jfree.chart.demo.PeriodAxisDemo1.java
public PeriodAxisDemo1(String s) { super(s);// w ww.j a va 2 s . co m XYDataset xydataset = createDataset(); JFreeChart jfreechart = createChart(xydataset); ChartPanel chartpanel = new ChartPanel(jfreechart, false); chartpanel.setPreferredSize(new Dimension(500, 270)); chartpanel.setMouseZoomable(true, false); setContentPane(chartpanel); }