How to put benchmark line on barchart?

后端 未结 2 1456
野趣味
野趣味 2021-01-24 05:06

We are using the jfreechart with Jasper reports and we are struggling to put the benchmark line on the bar chart.

How can this be achieved using jasper reports?

2条回答
  •  臣服心动
    2021-01-24 05:45

    We have resolved it by using the following code in customise class

    ValueMarker marker = new ValueMarker(30);
        marker.setLabel("Average 30%");
        marker.setPaint(Color.black);
        plot.addRangeMarker(marker);
    

    However we need to change the label position, currently it is showing at the start of the line.

提交回复
热议问题