By using StandardCategoryItemLabelGenerator() Iam able to display the exact range axis value on a bar, Now my problem is I dont want to display the range axis value instead
renderer.setBaseItemLabelGenerator(
new StandardCategoryItemLabelGenerator()
@Override
public String generateLabel(CategoryDataset dataset, int row, int column) {
return "Your Text" +row+","+column;
}
);
StandardCategoryItemLabelGenerator
uses an instance of MessgeFormat
for this, defaulting to ArgumentIndex {2}
. The other ArgumentIndex values are defined in the abstract parent. For example,
renderer.setBaseItemLabelGenerator(
new StandardCategoryItemLabelGenerator(
"{0} {1} {2} {3}", NumberFormat.getInstance()));
renderer.setBaseItemLabelsVisible(true);
You can also override generateLabel()
to return any value you want.