Example usage for org.jfree.chart.renderer StandardXYItemRenderer LINES

List of usage examples for org.jfree.chart.renderer StandardXYItemRenderer LINES

Introduction

In this page you can find the example usage for org.jfree.chart.renderer StandardXYItemRenderer LINES.

Prototype

int LINES

To view the source code for org.jfree.chart.renderer StandardXYItemRenderer LINES.

Click Source Link

Document

Constant for the type of rendering (lines only).

Usage

From source file:com.sixrr.metrics.ui.charts.DistributionDialog.java

private JFreeChart createChart(XYDataset dataset) {
    final String title = getTitle();

    final NumberAxis xAxis = new NumberAxis(metricName);
    xAxis.setAutoRangeIncludesZero(false);
    if (metricType == MetricType.Ratio || metricType == MetricType.RecursiveRatio) {
        xAxis.setNumberFormatOverride(new PercentFormatter());
    }/*from  w  w w .  j  a  v  a  2 s  .  c  om*/
    final NumberAxis yAxis = new NumberAxis("%");
    final XYItemRenderer renderer = new StandardXYItemRenderer(StandardXYItemRenderer.LINES);
    final XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
    plot.setOrientation(PlotOrientation.VERTICAL);
    renderer.setToolTipGenerator(new StandardXYToolTipGenerator());
    return new JFreeChart(title, JFreeChartConstants.DEFAULT_TITLE_FONT, plot, true);
}

From source file:com.sixrr.metrics.ui.charts.DiffDistributionDialog.java

private JFreeChart createChart(XYDataset dataset) {
    final String title = getTitle();

    final NumberAxis xAxis = new NumberAxis(metricName);
    xAxis.setAutoRangeIncludesZero(false);
    if (metricType.equals(MetricType.Ratio) || metricType.equals(MetricType.RecursiveRatio)) {
        xAxis.setNumberFormatOverride(new PercentFormatter());
    }/*from   w w  w. j a  v  a2 s. c om*/
    final NumberAxis yAxis = new NumberAxis("%");
    final XYItemRenderer renderer = new StandardXYItemRenderer(StandardXYItemRenderer.LINES);
    final XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
    plot.setOrientation(PlotOrientation.VERTICAL);
    renderer.setToolTipGenerator(new StandardXYToolTipGenerator());
    return new JFreeChart(title, JFreeChartConstants.DEFAULT_TITLE_FONT, plot, true);
}