Example usage for org.jfree.chart.renderer.xy StandardXYItemRenderer setAutoPopulateSeriesShape

List of usage examples for org.jfree.chart.renderer.xy StandardXYItemRenderer setAutoPopulateSeriesShape

Introduction

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

Prototype

public void setAutoPopulateSeriesShape(boolean auto) 

Source Link

Document

Sets the flag that controls whether or not the series shape list is automatically populated when #lookupSeriesShape(int) is called.

Usage

From source file:com.att.aro.ui.view.diagnostictab.CreateBarPlot.java

public XYPlot drawStandardXYPlot(Shape shape, Color color, int minSignal, int maxSignal) {
    // Set up renderer
    StandardXYItemRenderer batteryRenderer = new StandardXYItemRenderer(
            StandardXYItemRenderer.SHAPES_AND_LINES);
    batteryRenderer.setAutoPopulateSeriesShape(false);
    batteryRenderer.setBaseShape(shape);
    batteryRenderer.setSeriesPaint(0, color);

    // Normalize the throughput axis so that it represents max value
    NumberAxis axis = new NumberAxis();
    axis.setVisible(false);//from  ww w.j  a  v a 2s. co m
    axis.setAutoRange(false);
    axis.setRange(minSignal, maxSignal);

    // Create plot
    XYPlot barPlot = new XYPlot(null, null, axis, batteryRenderer);
    barPlot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);
    barPlot.getRangeAxis().setVisible(false);

    return barPlot;
}

From source file:com.att.aro.diagnostics.GraphPanel.java

/**
 * Sets up the CPU plot// ww  w. j a va  2 s .c  om
 * 
 * @return plot CPU plot
 */
private static XYPlot createCpuPlot() {

    // Set up renderer
    StandardXYItemRenderer renderer = new StandardXYItemRenderer(StandardXYItemRenderer.SHAPES_AND_LINES);
    renderer.setAutoPopulateSeriesShape(false);
    renderer.setBaseShape(CPU_PLOT_POINT_SHAPE);
    renderer.setSeriesPaint(0, Color.black);

    // Normalize the throughput axis so that it represents max value
    NumberAxis axis = new NumberAxis();
    axis.setVisible(false);
    axis.setAutoRange(false);
    axis.setRange(MIN_CPU_USAGE, MAX_CPU_USAGE);

    // Create plot
    XYPlot plot = new XYPlot(null, null, axis, renderer);
    plot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);
    plot.getRangeAxis().setVisible(false);

    return plot;
}

From source file:com.att.aro.diagnostics.GraphPanel.java

/**
 * Returns a XYPlot for Radio info//  w  w  w .j a va 2  s. co  m
 * 
 * @return XYPlot.
 */
private static XYPlot createRadioPlot() {

    // Set up renderer
    StandardXYItemRenderer radioRenderer = new StandardXYItemRenderer(StandardXYItemRenderer.SHAPES_AND_LINES);
    radioRenderer.setAutoPopulateSeriesShape(false);
    radioRenderer.setBaseShape(DEFAULT_POINT_SHAPE);
    radioRenderer.setSeriesPaint(0, Color.red);

    // Normalize the throughput axis so that it represents max value
    NumberAxis axis = new NumberAxis();
    axis.setVisible(false);
    axis.setAutoRange(false);
    axis.setRange(MIN_SIGNAL, MAX_SIGNAL);

    // Create plot
    XYPlot radioPlot = new XYPlot(null, null, axis, radioRenderer);
    radioPlot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);
    radioPlot.getRangeAxis().setVisible(false);

    return radioPlot;

}

From source file:com.att.aro.diagnostics.GraphPanel.java

/**
 * Returns a XYPlot for Battery Info/*  w  w  w . ja v  a2 s  .  c om*/
 * 
 * @return XYPlot.
 */
private static XYPlot createBatteryPlot() {

    // Set up renderer
    StandardXYItemRenderer batteryRenderer = new StandardXYItemRenderer(
            StandardXYItemRenderer.SHAPES_AND_LINES);
    batteryRenderer.setAutoPopulateSeriesShape(false);
    batteryRenderer.setBaseShape(DEFAULT_POINT_SHAPE);
    batteryRenderer.setSeriesPaint(0, Color.red);

    // Normalize the throughput axis so that it represents max value
    NumberAxis axis = new NumberAxis();
    axis.setVisible(false);
    axis.setAutoRange(false);
    axis.setRange(0, 110);

    // Create plot
    XYPlot batteryPlot = new XYPlot(null, null, axis, batteryRenderer);
    batteryPlot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);
    batteryPlot.getRangeAxis().setVisible(false);

    return batteryPlot;

}