if (showGradient) {
validateGradientParameters(chartView.getG1WhitePosition(),
chartView.getG2FullIntensityPosition(), chartView.getG3LightIntensityPosition());
GradientXYBarPainterAdapter gradientPainter =
new GradientXYBarPainterAdapter(chartView.getG1WhitePosition(),
chartView.getG2FullIntensityPosition(), chartView.getG3LightIntensityPosition());
xyBarRenderer.setBarPainter(gradientPainter);
} else {
xyBarRenderer.setBarPainter(new StandardXYBarPainterAdapter());