this.positiveBarPaint = positiveBarPaint; this.negativeBarPaint = negativeBarPaint; setGradientPaintTransformer(new StandardGradientPaintTransformer( GradientPaintTransformType.CENTER_VERTICAL)); setMinimumBarLength(1.0);
/** * Constructs a new waterfall renderer. * * @param firstBarPaint the color of the first bar ({@code null} not * permitted). * @param positiveBarPaint the color for bars with positive values * ({@code null} not permitted). * @param negativeBarPaint the color for bars with negative values * ({@code null} not permitted). * @param lastBarPaint the color of the last bar ({@code null} not * permitted). */ public WaterfallBarRenderer(Paint firstBarPaint, Paint positiveBarPaint, Paint negativeBarPaint, Paint lastBarPaint) { super(); Args.nullNotPermitted(firstBarPaint, "firstBarPaint"); Args.nullNotPermitted(positiveBarPaint, "positiveBarPaint"); Args.nullNotPermitted(negativeBarPaint, "negativeBarPaint"); Args.nullNotPermitted(lastBarPaint, "lastBarPaint"); this.firstBarPaint = firstBarPaint; this.lastBarPaint = lastBarPaint; this.positiveBarPaint = positiveBarPaint; this.negativeBarPaint = negativeBarPaint; setGradientPaintTransformer(new StandardGradientPaintTransformer( GradientPaintTransformType.CENTER_VERTICAL)); setMinimumBarLength(1.0); }
GradientPaintTransformer gradientPaintTransformer = categoryRenderer.getGradientPaintTransformer(); if (gradientPaintTransformer != null) { renderer.setGradientPaintTransformer(gradientPaintTransformer);