Package com.positive.charts.plot.xy

Examples of com.positive.charts.plot.xy.XYPlot


    final ValueAxis timeAxis = new DateAxis(timeAxisLabel);
    timeAxis.setLowerMargin(0.02); // reduce the default margins
    timeAxis.setUpperMargin(0.02);
    final NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false); // override default
    final XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, null);

    // XYToolTipGenerator toolTipGenerator = null;
    // if (tooltips) {
    // toolTipGenerator = StandardXYToolTipGenerator
    // .getTimeSeriesInstance();
    // }
    //
    // XYURLGenerator urlGenerator = null;
    // if (urls) {
    // urlGenerator = new StandardXYURLGenerator();
    // }

    final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer(
        true, false);
    // renderer.setBaseToolTipGenerator(toolTipGenerator);
    // renderer.setURLGenerator(urlGenerator);
    plot.setRenderer(renderer);

    final Chart chart = new Chart(plot, legend);
    chart.setTitle(title);
    return chart;
View Full Code Here


   *
   * @return A legend item for the series.
   */
  public LegendItem getLegendItem(final int datasetIndex, final int series) {
    LegendItem result = null;
    final XYPlot xyplot = this.getPlot();
    if (xyplot != null) {
      final XYDataset dataset = xyplot.getDataset(datasetIndex);
      if (dataset != null) {

        final String label = this.legendItemLabelGenerator
            .generateLabel(dataset, series);
        final String description = label;
View Full Code Here

TOP

Related Classes of com.positive.charts.plot.xy.XYPlot

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.