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:views.SentimentGraph.java
public SentimentGraph(String applicationTitle, String chartTitle) throws ParseException { super(applicationTitle); JFreeChart lineChart = ChartFactory.createLineChart(chartTitle, "Date", "Polarity", createDataset(), PlotOrientation.VERTICAL, true, true, false); ChartPanel chartPanel = new ChartPanel(lineChart); chartPanel.setPreferredSize(new java.awt.Dimension(1000, 367)); JScrollPane pane = new JScrollPane(); pane.add(chartPanel);// w w w. ja v a2 s .c o m setContentPane(chartPanel); }
From source file:org.jfree.chart.demo.XYLineAndShapeRendererDemo1.java
public XYLineAndShapeRendererDemo1(String s) { super(s);/*www .ja va 2s . c o m*/ XYDataset xydataset = createDataset(); JFreeChart jfreechart = createChart(xydataset); ChartPanel chartpanel = new ChartPanel(jfreechart); chartpanel.setPreferredSize(new Dimension(500, 300)); setContentPane(chartpanel); }
From source file:org.jfree.chart.demo.StatisticalLineChartDemo1.java
public StatisticalLineChartDemo1(String s) { super(s);//from ww w .ja v a2s. co m CategoryDataset categorydataset = createDataset(); JFreeChart jfreechart = createChart(categorydataset); ChartPanel chartpanel = new ChartPanel(jfreechart); chartpanel.setPreferredSize(new Dimension(500, 270)); setContentPane(chartpanel); }
From source file:democsv.XYLineChart_AWT.java
public XYLineChart_AWT(String applicationTitle, String chartTitle) { super(applicationTitle); JFreeChart xylineChart = ChartFactory.createXYLineChart(chartTitle, "Category", "Score", createDataset(), 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);//from w w w. j a va2 s. c o m setContentPane(chartPanel); }
From source file:TemHm.LineChart_AWT.java
public LineChart_AWT(String applicationTitle, String chartTitle) { super(applicationTitle); JFreeChart lineChart = ChartFactory.createLineChart(chartTitle, "Registo", "temperatura", 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 va 2s. c o m*/ }
From source file:ttma.client.GUI.StatFinance.java
public StatFinance(String applicationTitle, String chartTitle, String mois, String Anne) { super(applicationTitle); JFreeChart barChart = ChartFactory.createBarChart(chartTitle + " " + mois + " " + Anne, "Category", "TND", createDataset(), PlotOrientation.VERTICAL, true, true, false); ChartPanel chartPanel = new ChartPanel(barChart); chartPanel.setPreferredSize(new java.awt.Dimension(700, 400)); setContentPane(chartPanel);//from w ww .j a v a 2 s . com }
From source file:views.StockGraph.java
public StockGraph(String FrameTitle, String chartTitle) { super(FrameTitle); JFreeChart lineChart = ChartFactory.createLineChart(chartTitle, "Date", "Price", createDataset(), PlotOrientation.VERTICAL, true, true, false); ChartPanel chartPanel = new ChartPanel(lineChart); chartPanel.setPreferredSize(new java.awt.Dimension(1000, 367)); JScrollPane pane = new JScrollPane(); pane.add(chartPanel);//w w w . j av a2 s.c o m setContentPane(chartPanel); }
From source file:org.jfree.chart.demo.EventFrequencyDemo1.java
public EventFrequencyDemo1(String s) { super(s);//from w ww.j av a 2 s . c o m CategoryDataset categorydataset = createDataset(); JFreeChart jfreechart = createChart(categorydataset); ChartPanel chartpanel = new ChartPanel(jfreechart); chartpanel.setPreferredSize(new Dimension(500, 270)); setContentPane(chartpanel); }
From source file:Diagramas.BarChart_AWT.java
public BarChart_AWT(String applicationTitle, String chartTitle) throws IOException { super(applicationTitle); JFreeChart barChart = ChartFactory.createBarChart(chartTitle, "Category", "Score", createDataset(), PlotOrientation.VERTICAL, true, true, false); int width = 640; /* Width of the image */ int height = 480; /* Height of the image */ File BarChart = new File("BarChart.png"); ChartUtilities.saveChartAsPNG(BarChart, barChart, width, height); ChartPanel chartPanel = new ChartPanel(barChart); chartPanel.setPreferredSize(new java.awt.Dimension(560, 367)); setContentPane(chartPanel);/*from w w w . ja v a 2 s . co m*/ }
From source file:org.jfree.chart.demo.CategoryStepChartDemo1.java
public CategoryStepChartDemo1(String s) { super(s);/*www . jav a2 s . co m*/ CategoryDataset categorydataset = createDataset(); JFreeChart jfreechart = createChart(categorydataset); ChartPanel chartpanel = new ChartPanel(jfreechart); chartpanel.setPreferredSize(new Dimension(500, 270)); chartpanel.setEnforceFileExtensions(false); setContentPane(chartpanel); }