Examples of XYPlot


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

Examples of org.jfree.chart.plot.XYPlot

    {
      final NumberAxis catAxis = new NumberAxis("Range");// NON-NLS
      final NumberAxis barsAxis = new NumberAxis("Value");// NON-NLS
      final NumberAxis linesAxis = new NumberAxis("Value2");// NON-NLS

      final XYPlot plot = new XYPlot(createXYZDataset(), catAxis, barsAxis, new XYAreaRenderer());
      plot.setRenderer(1, new XYLineAndShapeRenderer());

      // add lines dataset and axis to plot
      plot.setDataset(1, createXYZDataset());
      plot.setRangeAxis(1, linesAxis);

      // map lines to second axis
      plot.mapDatasetToRangeAxis(1, 1);

      // set rendering order
      plot.setDatasetRenderingOrder(DatasetRenderingOrder.FORWARD);

      // set location of second axis
      plot.setRangeAxisLocation(1, AxisLocation.BOTTOM_OR_RIGHT);

      return new JFreeChart("XY Area Line Chart", plot);// NON-NLS
    }
    if (aExpression instanceof XYAreaChartExpression)
    {
View Full Code Here

Examples of org.jfree.chart.plot.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 XYBarRenderer renderer;
    if (stacked)
    {
      renderer = new StackedXYBarRenderer();
    }
    else
    {
      renderer = new XYBarRenderer();
    }
    renderer.setBaseToolTipGenerator(toolTipGenerator);
    renderer.setURLGenerator(urlGenerator);
    plot.setRenderer(renderer);

    return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
  }
View Full Code Here

Examples of org.jfree.chart.plot.XYPlot

    if (urls)
    {
      renderer.setURLGenerator(new StandardXYURLGenerator());
    }

    final XYPlot plot = new XYPlot(dataset, domainAxis, valueAxis, renderer);
    plot.setOrientation(orientation);

    return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
        plot, legend);
  }
View Full Code Here

Examples of org.jfree.chart.plot.XYPlot

    if (urls)
    {
      renderer.setURLGenerator(new StandardXYURLGenerator());
    }

    final XYPlot plot = new XYPlot(dataset, domainAxis, valueAxis, renderer);
    plot.setOrientation(orientation);

    return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
        plot, legend);
  }
View Full Code Here

Examples of org.jfree.chart.plot.XYPlot

  protected void configureChart(final JFreeChart chart)
  {
    super.configureChart(chart);

    final XYPlot xypl = chart.getXYPlot();
    final XYItemRenderer renderer = xypl.getRenderer();
    final XYBarRenderer br = (XYBarRenderer) renderer;
    br.setDrawBarOutline(isChartSectionOutline());
    if (margin != null)
    {
      br.setMargin(margin.doubleValue());
View Full Code Here

Examples of org.jfree.chart.plot.XYPlot

    if (xyDataset instanceof TimeSeriesCollection)
    {
      chart =
          ChartFactory.createTimeSeriesChart(computeTitle(), getDomainTitle(), getRangeTitle(), xyDataset,
              isShowLegend(), false, false);
      final XYPlot xyPlot = chart.getXYPlot();
      final XYLineAndShapeRenderer itemRenderer = (XYLineAndShapeRenderer) xyPlot.getRenderer();
      final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer(false, true);
      renderer.setBaseToolTipGenerator(itemRenderer.getBaseToolTipGenerator());
      renderer.setURLGenerator(itemRenderer.getURLGenerator());
      xyPlot.setRenderer(renderer);

    }
    else
    {
      final PlotOrientation orientation = computePlotOrientation();
View Full Code Here

Examples of org.jfree.chart.plot.XYPlot

  protected void configureChart(final JFreeChart chart)
  {
    super.configureChart(chart);

    final XYPlot xypl = chart.getXYPlot();
    final XYItemRenderer renderer = xypl.getRenderer();
    if (renderer instanceof XYDotRenderer)
    {
      final XYDotRenderer renderer1 = (XYDotRenderer) renderer;
      renderer1.setDotHeight(getDotHeight());
      renderer1.setDotWidth(getDotWidth());
View Full Code Here

Examples of org.jfree.chart.plot.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 XYAreaRenderer2 renderer;
    if (stacked)
    {
      renderer = new StackedXYAreaRenderer2();
    }
    else
    {
      renderer = new XYAreaRenderer2();
    }
    renderer.setBaseToolTipGenerator(toolTipGenerator);
    renderer.setURLGenerator(urlGenerator);
    plot.setRenderer(renderer);

    return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
  }
View Full Code Here

Examples of org.jfree.chart.plot.XYPlot

    {
      urlGenerator = new StandardXYURLGenerator();
    }
    final StackedXYAreaRenderer2 renderer = new StackedXYAreaRenderer2(toolTipGenerator, urlGenerator);
    renderer.setOutline(true);
    final XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
    plot.setOrientation(orientation);

    plot.setRangeAxis(yAxis)// forces recalculation of the axis range

    return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.