/** * Creates a stepped XY 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). * * @return A chart. * * @since 1.0.16 */ public static JFreeChart createXYStepChart(String title, String xAxisLabel, String yAxisLabel, XYDataset dataset) { return createXYStepChart(title, xAxisLabel, yAxisLabel, dataset, PlotOrientation.VERTICAL, true, true, false); }
public static JFreeChart createXYStepChart(String title, String xAxisLabel, String yAxisLabel, XYDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls) { JFreeChart chart = ChartFactory.createXYStepChart(title, xAxisLabel, yAxisLabel, dataset, orientation, legend, tooltips, urls); setXYStepChartDefaults(chart); return chart; }
public JFreeChart createChart(Chart chart) { ChartModel model = (ChartModel) chart.getModel(); if (!(model instanceof XYModel)) { throw new UiException("model must be a org.zkoss.zul.XYModel"); } return ChartFactory.createXYStepChart( chart.getTitle(), chart.getXAxis(), chart.getYAxis(), XYModelToXYDataset((XYModel)model), getOrientation(chart.getOrient()), chart.isShowLegend(), chart.isShowTooltiptext(), true); } }
public static JFreeChart getStepChart(String title, TSContainer2 container) { TimeSeriesCollection tempDataSet = new TimeSeriesCollection(); for (int i = 0; i < container.getNumColumns(); i++) { DoubleColumn dc = (DoubleColumn) container.getColumns().get(i); List<TimeStamp> ts = container.getTimeStamps(); TimeSeries tsNew = new TimeSeries(container.getColumnHeaders().get(i)); for (int j = 0; j < dc.size(); j++) tsNew.addOrUpdate(new Millisecond(ts.get(j).getDate()), dc.get(j)); // add a new series. tempDataSet.addSeries(tsNew); } JFreeChart chart = ChartFactory.createXYStepChart(title, "Time", "Value", tempDataSet, PlotOrientation.VERTICAL, true, true, false); chart.setBackgroundPaint(Color.WHITE); chart.getPlot().setBackgroundPaint(Color.WHITE); ((XYPlot)chart.getPlot()).setDomainGridlinePaint(Color.LIGHT_GRAY); ((XYPlot)chart.getPlot()).setRangeGridlinePaint(Color.LIGHT_GRAY); return chart; } }
xyData.addSeries(onRouteSerie); final JFreeChart chart = ChartFactory.createXYStepChart( "Leg Histogram, " + modeName + ", it." + this.iteration, "time", "# vehicles",
xyData.addSeries(togetherSerie); final JFreeChart chart = ChartFactory.createXYStepChart( "Courtesy Statistics," + "actType "+actType+
xyData.addSeries(onRouteSerie); final JFreeChart chart = ChartFactory.createXYStepChart( "Leg Histogram, " + mode + ", it." + iteration, "time", "# persons",