Java Code Examples for org.jfree.chart.renderer.PolarItemRenderer#drawSeries()

The following examples show how to use org.jfree.chart.renderer.PolarItemRenderer#drawSeries() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PolarPlot.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws a representation of the data within the dataArea region, using the
 * current m_Renderer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the region in which the data is to be drawn.
 * @param info  an optional object for collection dimension
 *              information (<code>null</code> permitted).
 */
protected void render(Graphics2D g2, Rectangle2D dataArea,
        PlotRenderingInfo info) {

    // now get the data and plot it (the visual representation will depend
    // on the m_Renderer that has been set)...
    boolean hasData = false;
    int datasetCount = this.datasets.size();
    for (int i = datasetCount - 1; i >= 0; i--) {
        XYDataset dataset = getDataset(i);
        if (dataset == null) {
            continue;
        }
        PolarItemRenderer renderer = getRenderer(i);
        if (renderer == null) {
            continue;
        }
        if (!DatasetUtilities.isEmptyOrNull(dataset)) {
            hasData = true;
            int seriesCount = dataset.getSeriesCount();
            for (int series = 0; series < seriesCount; series++) {
                renderer.drawSeries(g2, dataArea, info, this, dataset,
                        series);
            }
        }
    }
    if (!hasData) {
        drawNoDataMessage(g2, dataArea);
    }
}
 
Example 2
Source File: PolarPlot.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws a representation of the data within the dataArea region, using the
 * current m_Renderer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the region in which the data is to be drawn.
 * @param info  an optional object for collection dimension
 *              information (<code>null</code> permitted).
 */
protected void render(Graphics2D g2, Rectangle2D dataArea,
        PlotRenderingInfo info) {

    // now get the data and plot it (the visual representation will depend
    // on the m_Renderer that has been set)...
    boolean hasData = false;
    int datasetCount = this.datasets.size();
    for (int i = datasetCount - 1; i >= 0; i--) {
        XYDataset dataset = getDataset(i);
        if (dataset == null) {
            continue;
        }
        PolarItemRenderer renderer = getRenderer(i);
        if (renderer == null) {
            continue;
        }
        if (!DatasetUtilities.isEmptyOrNull(dataset)) {
            hasData = true;
            int seriesCount = dataset.getSeriesCount();
            for (int series = 0; series < seriesCount; series++) {
                renderer.drawSeries(g2, dataArea, info, this, dataset,
                        series);
            }
        }
    }
    if (!hasData) {
        drawNoDataMessage(g2, dataArea);
    }
}
 
Example 3
Source File: PolarPlot.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Draws a representation of the data within the dataArea region, using the
 * current m_Renderer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the region in which the data is to be drawn.
 * @param info  an optional object for collection dimension
 *              information (<code>null</code> permitted).
 */
protected void render(Graphics2D g2, Rectangle2D dataArea,
        PlotRenderingInfo info) {

    // now get the data and plot it (the visual representation will depend
    // on the m_Renderer that has been set)...
    boolean hasData = false;
    int datasetCount = this.datasets.size();
    for (int i = datasetCount - 1; i >= 0; i--) {
        XYDataset dataset = getDataset(i);
        if (dataset == null) {
            continue;
        }
        PolarItemRenderer renderer = getRenderer(i);
        if (renderer == null) {
            continue;
        }
        if (!DatasetUtilities.isEmptyOrNull(dataset)) {
            hasData = true;
            int seriesCount = dataset.getSeriesCount();
            for (int series = 0; series < seriesCount; series++) {
                renderer.drawSeries(g2, dataArea, info, this, dataset,
                        series);
            }
        }
    }
    if (!hasData) {
        drawNoDataMessage(g2, dataArea);
    }
}
 
Example 4
Source File: PolarPlot.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws a representation of the data within the dataArea region, using the
 * current m_Renderer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the region in which the data is to be drawn.
 * @param info  an optional object for collection dimension
 *              information (<code>null</code> permitted).
 */
protected void render(Graphics2D g2, Rectangle2D dataArea,
        PlotRenderingInfo info) {

    // now get the data and plot it (the visual representation will depend
    // on the m_Renderer that has been set)...
    boolean hasData = false;
    int datasetCount = this.datasets.size();
    for (int i = datasetCount - 1; i >= 0; i--) {
        XYDataset dataset = getDataset(i);
        if (dataset == null) {
            continue;
        }
        PolarItemRenderer renderer = getRenderer(i);
        if (renderer == null) {
            continue;
        }
        if (!DatasetUtilities.isEmptyOrNull(dataset)) {
            hasData = true;
            int seriesCount = dataset.getSeriesCount();
            for (int series = 0; series < seriesCount; series++) {
                renderer.drawSeries(g2, dataArea, info, this, dataset,
                        series);
            }
        }
    }
    if (!hasData) {
        drawNoDataMessage(g2, dataArea);
    }
}
 
Example 5
Source File: PolarPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws a representation of the data within the dataArea region, using the
 * current m_Renderer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the region in which the data is to be drawn.
 * @param info  an optional object for collection dimension
 *              information (<code>null</code> permitted).
 */
protected void render(Graphics2D g2, Rectangle2D dataArea,
        PlotRenderingInfo info) {

    // now get the data and plot it (the visual representation will depend
    // on the m_Renderer that has been set)...
    boolean hasData = false;
    int datasetCount = this.datasets.size();
    for (int i = datasetCount - 1; i >= 0; i--) {
        XYDataset dataset = getDataset(i);
        if (dataset == null) {
            continue;
        }
        PolarItemRenderer renderer = getRenderer(i);
        if (renderer == null) {
            continue;
        }
        if (!DatasetUtilities.isEmptyOrNull(dataset)) {
            hasData = true;
            int seriesCount = dataset.getSeriesCount();
            for (int series = 0; series < seriesCount; series++) {
                renderer.drawSeries(g2, dataArea, info, this, dataset,
                        series);
            }
        }
    }
    if (!hasData) {
        drawNoDataMessage(g2, dataArea);
    }
}
 
Example 6
Source File: PolarPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws a representation of the data within the dataArea region, using the
 * current m_Renderer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the region in which the data is to be drawn.
 * @param info  an optional object for collection dimension
 *              information (<code>null</code> permitted).
 */
protected void render(Graphics2D g2, Rectangle2D dataArea,
        PlotRenderingInfo info) {

    // now get the data and plot it (the visual representation will depend
    // on the m_Renderer that has been set)...
    boolean hasData = false;
    int datasetCount = this.datasets.size();
    for (int i = datasetCount - 1; i >= 0; i--) {
        XYDataset dataset = getDataset(i);
        if (dataset == null) {
            continue;
        }
        PolarItemRenderer renderer = getRenderer(i);
        if (renderer == null) {
            continue;
        }
        if (!DatasetUtilities.isEmptyOrNull(dataset)) {
            hasData = true;
            int seriesCount = dataset.getSeriesCount();
            for (int series = 0; series < seriesCount; series++) {
                renderer.drawSeries(g2, dataArea, info, this, dataset,
                        series);
            }
        }
    }
    if (!hasData) {
        drawNoDataMessage(g2, dataArea);
    }
}