1

Can anybody help me to Remove White color strip on the left side of bar in stacked bar chart in JasperReports please. Need solution as soon as possible and bars are on exactly on the line please click this url for screen shot

.

Please see this the customizer class i am using to set properties for stacked bar chart in iReport.

public void customize(JFreeChart chart, JRChart jasperChart) {
    BarRenderer renderer = (BarRenderer) chart.getCategoryPlot().getRenderer();     
    CategoryItemLabelGenerator generator = new StandardCategoryItemLabelGenerator();

    /* Remove Bar Border*/
    renderer.setDrawBarOutline(false);

    //Spaces between bars
    renderer.setItemMargin(0.05);
    renderer.setSeriesPaint(0, Color.red);

    CategoryPlot plot = chart.getCategoryPlot();
    plot.setRangeGridlinesVisible(false);

    CategoryAxis axis = plot.getDomainAxis();
    axis.setLowerMargin(0.02);
    axis.setUpperMargin(0.02);
}

I have used "old" look StandardBarPainter to remove the white strip but it is unable to set setBarPainter it is showing The method setBarPainter(StandardBarPainter) is undefined for the type BarRenderer. i am new to java plase help please find the below image to fix the error.enter image description here

Rohit Yadbole
  • 65
  • 1
  • 9

0 Answers0