/** * Creates a wind plot with default settings. * * @param title the chart title (<code>null</code> permitted). * @param xAxisLabel a label for the x-axis (<code>null</code> permitted). * @param yAxisLabel a label for the y-axis (<code>null</code> permitted). * @param dataset the dataset for the chart (<code>null</code> permitted). * @param legend a flag that controls whether or not a legend is created. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A wind plot. * */ public static JFreeChart createWindPlot(String title, String xAxisLabel, String yAxisLabel, WindDataset dataset, boolean legend, boolean tooltips, boolean urls) { ValueAxis xAxis = new DateAxis(xAxisLabel); ValueAxis yAxis = new NumberAxis(yAxisLabel); yAxis.setRange(-12.0, 12.0); WindItemRenderer renderer = new WindItemRenderer(); if (tooltips) { renderer.setToolTipGenerator(new StandardXYToolTipGenerator()); } if (urls) { renderer.setURLGenerator(new StandardXYURLGenerator()); } XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer); JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); return chart; }
/** * Creates a wind plot with default settings. * * @param title the chart title (<code>null</code> permitted). * @param xAxisLabel a label for the x-axis (<code>null</code> permitted). * @param yAxisLabel a label for the y-axis (<code>null</code> permitted). * @param dataset the dataset for the chart (<code>null</code> permitted). * @param legend a flag that controls whether or not a legend is created. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A wind plot. * */ public static JFreeChart createWindPlot(String title, String xAxisLabel, String yAxisLabel, WindDataset dataset, boolean legend, boolean tooltips, boolean urls) { ValueAxis xAxis = new DateAxis(xAxisLabel); ValueAxis yAxis = new NumberAxis(yAxisLabel); yAxis.setRange(-12.0, 12.0); WindItemRenderer renderer = new WindItemRenderer(); if (tooltips) { renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); } if (urls) { renderer.setURLGenerator(new StandardXYURLGenerator()); } XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer); JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); currentTheme.apply(chart); return chart; }
/** * Creates a wind plot with default settings. * * @param title the chart title ({@code null} permitted). * @param xAxisLabel a label for the x-axis ({@code null} permitted). * @param yAxisLabel a label for the y-axis ({@code null} permitted). * @param dataset the dataset for the chart ({@code null} permitted). * @param legend a flag that controls whether or not a legend is created. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A wind plot. * */ public static JFreeChart createWindPlot(String title, String xAxisLabel, String yAxisLabel, WindDataset dataset, boolean legend, boolean tooltips, boolean urls) { ValueAxis xAxis = new DateAxis(xAxisLabel); ValueAxis yAxis = new NumberAxis(yAxisLabel); yAxis.setRange(-12.0, 12.0); WindItemRenderer renderer = new WindItemRenderer(); if (tooltips) { renderer.setDefaultToolTipGenerator(new StandardXYToolTipGenerator()); } if (urls) { renderer.setURLGenerator(new StandardXYURLGenerator()); } XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer); JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); currentTheme.apply(chart); return chart; }
/** * Creates a wind plot with default settings. * * @param title the chart title (<code>null</code> permitted). * @param xAxisLabel a label for the x-axis (<code>null</code> permitted). * @param yAxisLabel a label for the y-axis (<code>null</code> permitted). * @param dataset the dataset for the chart (<code>null</code> permitted). * @param legend a flag that controls whether or not a legend is created. * * @return A wind plot. */ public static JFreeChart createWindPlot(String title, String xAxisLabel, String yAxisLabel, WindDataset dataset, boolean legend) { ValueAxis xAxis = new DateAxis(xAxisLabel); ValueAxis yAxis = new NumberAxis(yAxisLabel); yAxis.setRange(-12.0, 12.0); WindItemRenderer renderer = new WindItemRenderer(); renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer); JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); currentTheme.apply(chart); return chart; }
/** * Creates a wind plot with default settings. * * @param title the chart title (<code>null</code> permitted). * @param xAxisLabel a label for the x-axis (<code>null</code> permitted). * @param yAxisLabel a label for the y-axis (<code>null</code> permitted). * @param dataset the dataset for the chart (<code>null</code> permitted). * @param legend a flag that controls whether or not a legend is created. * @param tooltips configure chart to generate tool tips? * @param urls configure chart to generate URLs? * * @return A wind plot. * */ public static JFreeChart createWindPlot(String title, String xAxisLabel, String yAxisLabel, WindDataset dataset, boolean legend, boolean tooltips, boolean urls) { ValueAxis xAxis = new DateAxis(xAxisLabel); ValueAxis yAxis = new NumberAxis(yAxisLabel); yAxis.setRange(-12.0, 12.0); WindItemRenderer renderer = new WindItemRenderer(); if (tooltips) { renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); } if (urls) { renderer.setURLGenerator(new StandardXYURLGenerator()); } XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer); JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend); return chart; }
public JFreeChart createChart() { JFreeChart chart = ChartFactory.createWindPlot(this.getTitle(), this.getXAxisLabel(), this.getYAxisLabel(), (WindDataset)this.getDataset(), this.isLegend(), this.isTooltips(), this.isUrls()); return setExtraProperties(chart); }
public WindDataset getWindDataset() { return this.vWindDataset; }