EntityCollection entities = state.getEntityCollection();
/** * Creates a new state instance---this method is called from the * {@link #initialise(Graphics2D, Rectangle2D, CategoryPlot, int, * PlotRenderingInfo)} method. Subclasses can override this method if * they need to use a subclass of {@link CategoryItemRendererState}. * * @param info collects plot rendering info ({@code null} permitted). * * @return The new state instance (never {@code null}). * * @since 1.0.5 */ protected CategoryItemRendererState createState(PlotRenderingInfo info) { return new CategoryItemRendererState(info); }
double seriesGap = dataArea.getHeight() * getItemMargin() / (categoryCount * (seriesCount - 1)); double usedWidth = (state.getBarWidth() * seriesCount) + (seriesGap * (seriesCount - 1)); yy = yy + offset + (row * (state.getBarWidth() + seriesGap)); double offset = (categoryWidth - state.getBarWidth()) / 2; yy = yy + offset; double xxMin = rangeAxis.valueToJava2D(xMin.doubleValue(), dataArea, location); double yymid = yy + state.getBarWidth() / 2.0; double halfW = (state.getBarWidth() / 2.0) * this.whiskerWidth; Math.abs(xxQ1 - xxQ3), state.getBarWidth()); if (this.fillBox) { g2.fill(box); double xxMean = rangeAxis.valueToJava2D(xMean.doubleValue(), dataArea, location); aRadius = state.getBarWidth() / 4; dataArea, location); g2.draw(new Line2D.Double(xxMedian, yy, xxMedian, yy + state.getBarWidth())); if (state.getInfo() != null && box != null) { EntityCollection entities = state.getEntityCollection();
int visibleRow = state.getVisibleSeriesIndex(row); if (visibleRow < 0) { return; if (orientation == PlotOrientation.HORIZONTAL) { x = barL; y = barW0 + state.getBarWidth() / 2.0; line = new Line2D.Double(barL, barW0, barL, barW0 + state.getBarWidth()); x = barW0 + state.getBarWidth() / 2.0; y = barL; line = new Line2D.Double(barW0, barL, barW0 + state.getBarWidth(), barL); updateCrosshairValues(state.getCrosshairState(), dataset.getRowKey(row), dataset.getColumnKey(column), value, datasetIndex, barW0, barL, orientation); EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, row, column, line.getBounds());
if (orientation == PlotOrientation.HORIZONTAL) { bar = new Rectangle2D.Double(barL0, barW0, barLength, state.getBarWidth()); bar = new Rectangle2D.Double(barW0, barL0, state.getBarWidth(), barLength); && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { g2.setStroke(getItemOutlineStroke(row, column)); g2.setPaint(getItemOutlinePaint(row, column)); EntityCollection entities = state.getEntityCollection(); if (entities != null) { GeneralPath barOutline = new GeneralPath();
dataArea, domainAxis, state, row, column); double rectLength = Math.abs(translatedValue1 - translatedValue0); double rectBreadth = state.getBarWidth(); && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { g2.setStroke(getItemStroke(row, column)); g2.setPaint(getItemOutlinePaint(row, column)); rowKey, dataset, getItemMargin(), dataArea, plot.getDomainAxisEdge()); updateCrosshairValues(state.getCrosshairState(), dataset.getRowKey(row), dataset.getColumnKey(column), value1.doubleValue(), datasetIndex, xx, if (state.getInfo() != null) { EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, row, column, bar);
int pass) { double previous = state.getSeriesRunningTotal(); if (column == dataset.getColumnCount() - 1) { previous = 0.0; current = previous + n.doubleValue(); state.setSeriesRunningTotal(current); double rectWidth = state.getBarWidth(); rectHeight = state.getBarWidth(); rectY = rectY - rectHeight / 2.0; rectWidth = Math.max(getMinimumBarLength(), && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { Stroke stroke = getItemOutlineStroke(row, column); Paint paint = getItemOutlinePaint(row, column); EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, row, column, bar);
int visibleRow = state.getVisibleSeriesIndex(row); if (visibleRow < 0) { return; int seriesCount = state.getVisibleSeriesCount() >= 0 ? state.getVisibleSeriesCount() : getRowCount(); double rectWidth = state.getBarWidth(); double seriesGap = dataArea.getHeight() * getItemMargin() / (categoryCount * (seriesCount - 1)); rectY = rectY + visibleRow * (state.getBarWidth() + seriesGap); rectY = rectY + visibleRow * state.getBarWidth(); rectHeight = state.getBarWidth(); rectWidth = Math.abs(java2dValue1 - java2dValue0); barBase = RectangleEdge.LEFT; double seriesGap = dataArea.getWidth() * getItemMargin() / (categoryCount * (seriesCount - 1)); rectX = rectX + visibleRow * (state.getBarWidth() + seriesGap); rectX = rectX + visibleRow * state.getBarWidth(); EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, row, column, bar);
int visibleRow = state.getVisibleSeriesIndex(row); if (visibleRow < 0) { return; int visibleRowCount = state.getVisibleSeriesCount(); updateCrosshairValues(state.getCrosshairState(), dataset.getRowKey(row), dataset.getColumnKey(column), value, datasetIndex, x1, y1, orientation); EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, row, column, shape);
if (this.renderAsPercentages) { total = DataUtils.calculateColumnTotal(dataset, column, state.getVisibleSeriesArray()); value = value / total; double barW0 = domainAxis.getCategoryMiddle(column, getColumnCount(), dataArea, plot.getDomainAxisEdge()) - state.getBarWidth() / 2.0; if (orientation == PlotOrientation.HORIZONTAL) { bar = new Rectangle2D.Double(barL0, barW0, barLength, state.getBarWidth()); bar = new Rectangle2D.Double(barW0, barL0, state.getBarWidth(), barLength); EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, row, column, bar);
double rectBreadth = state.getBarWidth(); double rectLength = Math.abs(java2dValue1 - java2dValue0); && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { Stroke stroke = getItemOutlineStroke(row, column); Paint paint = getItemOutlinePaint(row, column); double xx = domainAxis.getCategorySeriesMiddle(columnKey, rowKey, dataset, getItemMargin(), dataArea, plot.getDomainAxisEdge()); updateCrosshairValues(state.getCrosshairState(), dataset.getRowKey(row), dataset.getColumnKey(column), value1.doubleValue(), datasetIndex, xx, java2dValue1, EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, row, column, bar);
dataArea, xAxisLocation); int seriesCount = state.getVisibleSeriesCount() >= 0 ? state.getVisibleSeriesCount() : getRowCount(); int categoryCount = getColumnCount(); if (seriesCount > 1) { double seriesGap = dataArea.getWidth() * getItemMargin() / (categoryCount * (seriesCount - 1)); rectX = rectX + visibleRow * (state.getBarWidth() + seriesGap); rectX = rectX + visibleRow * state.getBarWidth(); double rectY = Math.min(transY2, transY1); double rectWidth = state.getBarWidth(); double rectHeight = Math.abs(transY2 - transY1); && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { Stroke stroke = getItemOutlineStroke(row, column); Paint paint = getItemOutlinePaint(row, column); EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, row, column, bar);
dataArea, plot.getDomainAxisEdge()) - state.getBarWidth() / 2.0; widthFactor = seriesBarWidth; rectHeight = widthFactor * state.getBarWidth(); rectY = rectY + (1 - widthFactor) * state.getBarWidth() / 2.0; if (seriesCount > 1) { shift = rectHeight * 0.20 / (seriesCount - 1); (rectHeight - (seriesCount - 1 - row) * shift * 2)); if (state.getElementHinting()) { beginElementGroup(g2, dataset.getRowKey(row), dataset.getColumnKey(column)); && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { Stroke stroke = getItemOutlineStroke(row, column); Paint paint = getItemOutlinePaint(row, column); EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, row, column, bar);
int visibleRow = state.getVisibleSeriesIndex(row); if (visibleRow < 0) { return; int visibleRowCount = state.getVisibleSeriesCount(); EntityCollection entities = state.getEntityCollection(); if (entities != null) { addEntity(entities, hotspot, dataset, row, column, x1, y1);
updateCrosshairValues(state.getCrosshairState(), dataset.getRowKey(row), dataset.getColumnKey(column), yy1, datasetIndex, x1, y1, orientation); EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, row, column, area);
EntityCollection entities = state.getEntityCollection(); if (this.renderAsPercentages) { double total = DataUtils.calculateColumnTotal(dataset, column, state.getVisibleSeriesArray()); y1 = y1 / total; state.getVisibleSeriesArray()); if (this.renderAsPercentages) { double total = DataUtils.calculateColumnTotal(dataset, Math.max(column - 1, 0), state.getVisibleSeriesArray()); y0 = y0 / total; state.getVisibleSeriesArray()); double total = DataUtils.calculateColumnTotal(dataset, Math.min(column + 1, itemCount - 1), state.getVisibleSeriesArray()); y2 = y2 / total; itemCount - 1), state.getVisibleSeriesArray());
int seriesCount = state.getVisibleSeriesCount() >= 0 ? state.getVisibleSeriesCount() : getRowCount(); int categoryCount = getColumnCount(); if (seriesCount > 1) { categoryCount, seriesCount); barW0 = barW0 + row * (seriesW + seriesGap) + (seriesW / 2.0) - (state.getBarWidth() / 2.0); dataArea, plot.getDomainAxisEdge()) - state.getBarWidth() / 2.0;
if (dataset != null) { int columns = dataset.getColumnCount(); int rows = state.getVisibleSeriesCount() >= 0 ? state.getVisibleSeriesCount() : dataset.getRowCount(); double space = 0.0; PlotOrientation orientation = plot.getOrientation(); - categoryMargin - currentItemMargin); if ((rows * columns) > 0) { state.setBarWidth(Math.min(used / (rows * columns), maxWidth)); } else { state.setBarWidth(Math.min(used, maxWidth));
return; int visibleRow = state.getVisibleSeriesIndex(row); if (visibleRow < 0) { return; int visibleRowCount = state.getVisibleSeriesCount();
categoryCount, groupCount); barW0 = barW0 + groupIndex * (groupW + groupGap) + (groupW / 2.0) - (state.getBarWidth() / 2.0); - state.getBarWidth() / 2.0;