afreechart/src/main/java/org/afree/chart/renderer/category/AbstractCategoryItemRenderer.java
/**
     * Initialises the renderer and returns a state object that will be used for
     * the remainder of the drawing process for a single chart. The state object
     * allows for the fact that the renderer may be used simultaneously by
     * multiple threads (each thread will work with a separate state object).
     * 
     * @param canvas
     *            the graphics device.
     * @param dataArea
     *            the data area.
     * @param plot
     *            the plot.
     * @param rendererIndex
     *            the renderer index.
     * @param info
     *            an object for returning information about the structure of the
     *            plot (<code>null</code> permitted).
     * 
     * @return The renderer state.
     */
Initialises the renderer and returns a state object that will be used for
the remainder of the drawing process for a single chart. The state object
allows for the fact that the renderer may be used simultaneously by
multiple threads (each thread will work with a separate state object).

@param canvas
the graphics device.
@param dataArea
the data area.
@param plot
the plot.
@param rendererIndex
the renderer index.
@param info
an object for returning information about the structure of the
plot (null permitted).

@return The renderer state.
Initialises the renderer and returns a state object that will be used for the remainder of the drawing process for a single chart . The state object allows for the fact that the renderer may be used simultaneously by multiple threads ( each thread will work with a separate state object ) . @param canvas the graphics device . @param dataArea the data area . @param plot the plot . @param rendererIndex the renderer index . @param info an object for returning information about the structure of the plot ( null permitted ) . @return The renderer state .
public CategoryItemRendererState initialise(Canvas canvas,
            RectShape dataArea, CategoryPlot plot, int rendererIndex,
            PlotRenderingInfo info) {
        setPlot(plot);
        CategoryDataset data = plot.getDataset(rendererIndex);
        if (data != null) {
            this.rowCount = data.getRowCount();
            this.columnCount = data.getColumnCount();
        } else {
            this.rowCount = 0;
            this.columnCount = 0;
        }
        CategoryItemRendererState state = createState(info);
        int[] visibleSeriesTemp = new int[this.rowCount];
        int visibleSeriesCount = 0;
        for (int row = 0; row < this.rowCount; row++) {
            if (isSeriesVisible(row)) {
                visibleSeriesTemp[visibleSeriesCount] = row;
                visibleSeriesCount++;
            }
        }
        int[] visibleSeries = new int[visibleSeriesCount];
        System.arraycopy(visibleSeriesTemp, 0, visibleSeries, 0,
                visibleSeriesCount);
        state.setVisibleSeriesArray(visibleSeries);
        return state;
    }
public CategoryItemRendererState initialise ( Canvas canvas , RectShape dataArea , CategoryPlot plot , int rendererIndex , PlotRenderingInfo info ) { setPlot ( plot ) ; CategoryDataset data = plot . getDataset ( rendererIndex ) ; if ( data != null ) { this . rowCount = data . getRowCount ( ) ; this . columnCount = data . getColumnCount ( ) ; } else { this . rowCount = 0 ; this . columnCount = 0 ; } CategoryItemRendererState state = createState ( info ) ; int [ ] visibleSeriesTemp = new int [ this . rowCount ] ; int visibleSeriesCount = 0 ; for ( int row = 0 ; row < this . rowCount ; row ++ ) { if ( isSeriesVisible ( row ) ) { visibleSeriesTemp [ visibleSeriesCount ] = row ; visibleSeriesCount ++ ; } } int [ ] visibleSeries = new int [ visibleSeriesCount ] ; System . arraycopy ( visibleSeriesTemp , 0 , visibleSeries , 0 , visibleSeriesCount ) ; state . setVisibleSeriesArray ( visibleSeries ) ; return state ; }
Initialises the renderer and returns a state object that will be used for
 the remainder of the drawing process for a single chart.
Initialises the renderer and returns a state object that will be used for the remainder of the drawing process for a single chart .