List of usage examples for org.jfree.chart ChartPanel setPreferredSize
@BeanProperty(preferred = true, description = "The preferred size of the component.") public void setPreferredSize(Dimension preferredSize)
From source file:scatterplot1k.JFreeScatter2.java
public JFreeScatter2(String title, int samplesCount) { super(title); this.samplesCount = samplesCount; JFreeChart chart = createChart(title, createDataset()); ChartPanel panel = new ChartPanel(chart); panel.setPreferredSize(new Dimension(800, 600)); panel.setMouseZoomable(false);/*from ww w.j a v a 2 s. com*/ this.add(panel); }
From source file:graficarfreechart.GraficarFreeChart.java
public GraficarFreeChart(String applicationTitle, String chartTitle) { super(applicationTitle); JFreeChart xylineChart = ChartFactory.createXYLineChart(chartTitle, "Category", "Score", dataset, PlotOrientation.VERTICAL, true, true, false); ChartPanel chartPanel = new ChartPanel(xylineChart); chartPanel.setPreferredSize(new java.awt.Dimension(560, 367)); final XYPlot plot = xylineChart.getXYPlot(); XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer(); renderer.setSeriesPaint(0, Color.RED); renderer.setSeriesPaint(1, Color.GREEN); renderer.setSeriesPaint(2, Color.YELLOW); renderer.setSeriesStroke(0, new BasicStroke(4.0f)); renderer.setSeriesStroke(1, new BasicStroke(3.0f)); renderer.setSeriesStroke(2, new BasicStroke(2.0f)); plot.setRenderer(renderer);/*ww w .j a va 2 s .co m*/ setContentPane(chartPanel); }
From source file:no.met.jtimeseries.ChartFrame.java
public ChartFrame(JFreeChart chart, Dimension size) { super("JTimeseries"); ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(size); setContentPane(chartPanel);/*from w w w . j av a 2s . c o m*/ setDefaultCloseOperation(EXIT_ON_CLOSE); }
From source file:org.jfree.chart.demo.BarChartDemo11.java
public BarChartDemo11(String s) { super(s);/*from w ww.j av a 2s . com*/ CategoryDataset categorydataset = createDataset(); JFreeChart jfreechart = createChart(categorydataset); ChartPanel chartpanel = new ChartPanel(jfreechart, false); chartpanel.setPreferredSize(new Dimension(500, 270)); setContentPane(chartpanel); }
From source file:geneticalgorithm2.LineChart_AWT.java
public LineChart_AWT(String applicationTitle, String chartTitle, ArrayList<Double> fitnessArrayList) { super(applicationTitle); JFreeChart lineChart = ChartFactory.createLineChart(chartTitle, "Number of Generations", "Minimum Value", createDataset(fitnessArrayList), PlotOrientation.VERTICAL, true, true, false); ChartPanel chartPanel = new ChartPanel(lineChart); chartPanel.setPreferredSize(new java.awt.Dimension(560, 367)); setContentPane(chartPanel);//from w w w . j av a 2 s . c o m }
From source file:cv.mikusher.freechart.LineChart.java
public LineChart(String applicationTitle, String chartTitle) { super(applicationTitle); setDefaultCloseOperation(ApplicationFrame.EXIT_ON_CLOSE); JFreeChart lineChart = ChartFactory.createLineChart(chartTitle, "Years", "Number of Schools", createDataset(), PlotOrientation.VERTICAL, true, true, false); ChartPanel chartPanel = new ChartPanel(lineChart); chartPanel.setPreferredSize(new java.awt.Dimension(560, 367)); setContentPane(chartPanel);/*from w w w .j a va2 s . co m*/ }
From source file:GUI.Custom.BarChart_AWT.java
public void initComponent() { JFreeChart barChart = ChartFactory.createBarChart(chartTitle, xName, yName, dataset, orientation, true, true, false);/* w w w. j av a2 s. com*/ ChartPanel chartPanel = new ChartPanel(barChart); chartPanel.setPreferredSize(new java.awt.Dimension(560, 367)); add(chartPanel); }
From source file:org.jfree.chart.demo.TimeSeriesDemo14.java
public TimeSeriesDemo14(String s) { super(s);//ww w . java2s. com 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:src.Barchart.java
public Barchart(String windowTitle, String chartTitle, String nombreChart, String nombreMetrica, ArrayList<String> barras, ArrayList<Double> valorBarras, String tiposValor) { super(windowTitle); JFreeChart barChart = ChartFactory.createBarChart(chartTitle, nombreChart, nombreMetrica, createDataset(barras, valorBarras, tiposValor), PlotOrientation.VERTICAL, true, true, false); this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); ChartPanel chartPanel = new ChartPanel(barChart); chartPanel.setPreferredSize(new java.awt.Dimension(560, 367)); setContentPane(chartPanel);/*from w w w . ja va 2 s . co m*/ }
From source file:org.jfree.chart.demo.StackedBarChart3DDemo1.java
public StackedBarChart3DDemo1(String s) { super(s);//from www . j a v a2 s . com CategoryDataset categorydataset = createDataset(); JFreeChart jfreechart = createChart(categorydataset); ChartPanel chartpanel = new ChartPanel(jfreechart); chartpanel.setPreferredSize(new Dimension(500, 270)); setContentPane(chartpanel); }