Java Code Examples for org.jfree.chart.plot.XYPlot#getRangeAxisForDataset()

The following examples show how to use org.jfree.chart.plot.XYPlot#getRangeAxisForDataset() . 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: XYBarRenderer.java    From openstock with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Initialises the renderer and returns a state object that should be
 * passed to all subsequent calls to the drawItem() method.  Here we
 * calculate the Java2D y-coordinate for zero, since all the bars have
 * their bases fixed at zero.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param dataset  the data.
 * @param info  an optional info collection object to return data back to
 *              the caller.
 *
 * @return A state object.
 */
@Override
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
        XYPlot plot, XYDataset dataset, PlotRenderingInfo info) {

    XYBarRendererState state = new XYBarRendererState(info);
    ValueAxis rangeAxis = plot.getRangeAxisForDataset(plot.indexOf(
            dataset));
    state.setG2Base(rangeAxis.valueToJava2D(this.base, dataArea,
            plot.getRangeAxisEdge()));
    return state;

}
 
Example 2
Source File: XYBarRenderer.java    From ccu-historian with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Initialises the renderer and returns a state object that should be
 * passed to all subsequent calls to the drawItem() method.  Here we
 * calculate the Java2D y-coordinate for zero, since all the bars have
 * their bases fixed at zero.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param dataset  the data.
 * @param info  an optional info collection object to return data back to
 *              the caller.
 *
 * @return A state object.
 */
@Override
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
        XYPlot plot, XYDataset dataset, PlotRenderingInfo info) {

    XYBarRendererState state = new XYBarRendererState(info);
    ValueAxis rangeAxis = plot.getRangeAxisForDataset(plot.indexOf(
            dataset));
    state.setG2Base(rangeAxis.valueToJava2D(this.base, dataArea,
            plot.getRangeAxisEdge()));
    return state;

}
 
Example 3
Source File: XYBarRenderer.java    From SIMVA-SoS with Apache License 2.0 3 votes vote down vote up
/**
 * Initialises the renderer and returns a state object that should be
 * passed to all subsequent calls to the drawItem() method.  Here we
 * calculate the Java2D y-coordinate for zero, since all the bars have
 * their bases fixed at zero.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param dataset  the data.
 * @param info  an optional info collection object to return data back to
 *              the caller.
 *
 * @return A state object.
 */
@Override
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
        XYPlot plot, XYDataset dataset, PlotRenderingInfo info) {

    XYBarRendererState state = new XYBarRendererState(info);
    ValueAxis rangeAxis = plot.getRangeAxisForDataset(plot.indexOf(
            dataset));
    state.setG2Base(rangeAxis.valueToJava2D(this.base, dataArea,
            plot.getRangeAxisEdge()));
    return state;

}
 
Example 4
Source File: XYBarRenderer.java    From ECG-Viewer with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Initialises the renderer and returns a state object that should be
 * passed to all subsequent calls to the drawItem() method.  Here we
 * calculate the Java2D y-coordinate for zero, since all the bars have
 * their bases fixed at zero.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param dataset  the data.
 * @param info  an optional info collection object to return data back to
 *              the caller.
 *
 * @return A state object.
 */
@Override
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
        XYPlot plot, XYDataset dataset, PlotRenderingInfo info) {

    XYBarRendererState state = new XYBarRendererState(info);
    ValueAxis rangeAxis = plot.getRangeAxisForDataset(plot.indexOf(
            dataset));
    state.setG2Base(rangeAxis.valueToJava2D(this.base, dataArea,
            plot.getRangeAxisEdge()));
    return state;

}
 
Example 5
Source File: XYBarRenderer.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Initialises the renderer and returns a state object that should be
 * passed to all subsequent calls to the drawItem() method.  Here we
 * calculate the Java2D y-coordinate for zero, since all the bars have
 * their bases fixed at zero.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param dataset  the data.
 * @param info  an optional info collection object to return data back to
 *              the caller.
 *
 * @return A state object.
 */
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
        XYPlot plot, XYDataset dataset, PlotRenderingInfo info) {

    XYBarRendererState state = (XYBarRendererState) super.initialise(g2,
            dataArea, plot, dataset, info);
    ValueAxis rangeAxis = plot.getRangeAxisForDataset(plot.indexOf(
            dataset));
    state.setG2Base(rangeAxis.valueToJava2D(this.base, dataArea,
            plot.getRangeAxisEdge()));
    return state;

}
 
Example 6
Source File: XYBarRenderer.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Initialises the renderer and returns a state object that should be 
 * passed to all subsequent calls to the drawItem() method.  Here we 
 * calculate the Java2D y-coordinate for zero, since all the bars have 
 * their bases fixed at zero.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param dataset  the data.
 * @param info  an optional info collection object to return data back to 
 *              the caller.
 *
 * @return A state object.
 */
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
        XYPlot plot, XYDataset dataset, PlotRenderingInfo info) {

    XYBarRendererState state = new XYBarRendererState(info);
    ValueAxis rangeAxis = plot.getRangeAxisForDataset(plot.indexOf(
            dataset));
    state.setG2Base(rangeAxis.valueToJava2D(this.base, dataArea, 
            plot.getRangeAxisEdge()));
    return state;

}
 
Example 7
Source File: XYBarRenderer.java    From opensim-gui with Apache License 2.0 3 votes vote down vote up
/**
 * Initialises the renderer and returns a state object that should be 
 * passed to all subsequent calls to the drawItem() method.  Here we 
 * calculate the Java2D y-coordinate for zero, since all the bars have 
 * their bases fixed at zero.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param dataset  the data.
 * @param info  an optional info collection object to return data back to 
 *              the caller.
 *
 * @return A state object.
 */
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
        XYPlot plot, XYDataset dataset, PlotRenderingInfo info) {

    XYBarRendererState state = new XYBarRendererState(info);
    ValueAxis rangeAxis = plot.getRangeAxisForDataset(plot.indexOf(
            dataset));
    state.setG2Base(rangeAxis.valueToJava2D(this.base, dataArea, 
            plot.getRangeAxisEdge()));
    return state;

}
 
Example 8
Source File: XYBarRenderer.java    From buffer_bci with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Initialises the renderer and returns a state object that should be
 * passed to all subsequent calls to the drawItem() method.  Here we
 * calculate the Java2D y-coordinate for zero, since all the bars have
 * their bases fixed at zero.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param dataset  the data.
 * @param info  an optional info collection object to return data back to
 *              the caller.
 *
 * @return A state object.
 */
@Override
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
        XYPlot plot, XYDataset dataset, PlotRenderingInfo info) {

    XYBarRendererState state = new XYBarRendererState(info);
    ValueAxis rangeAxis = plot.getRangeAxisForDataset(plot.indexOf(
            dataset));
    state.setG2Base(rangeAxis.valueToJava2D(this.base, dataArea,
            plot.getRangeAxisEdge()));
    return state;

}
 
Example 9
Source File: XYBarRenderer.java    From buffer_bci with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Initialises the renderer and returns a state object that should be
 * passed to all subsequent calls to the drawItem() method.  Here we
 * calculate the Java2D y-coordinate for zero, since all the bars have
 * their bases fixed at zero.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param plot  the plot.
 * @param dataset  the data.
 * @param info  an optional info collection object to return data back to
 *              the caller.
 *
 * @return A state object.
 */
@Override
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
        XYPlot plot, XYDataset dataset, PlotRenderingInfo info) {

    XYBarRendererState state = new XYBarRendererState(info);
    ValueAxis rangeAxis = plot.getRangeAxisForDataset(plot.indexOf(
            dataset));
    state.setG2Base(rangeAxis.valueToJava2D(this.base, dataArea,
            plot.getRangeAxisEdge()));
    return state;

}