Reputation: 938
I have a stacked bar chart like in the image above. What i need is to show both series names and values on each bar. How can i do that?
I can show series with this code:
renderer.setBaseItemLabelGenerator(
new StandardCategoryItemLabelGenerator("{0}", NumberFormat.getInstance()));
Upvotes: 1
Views: 273
Reputation: 938
I found the way to show both of them. The trick is to define each parameters format sequentially. Here is the code:
renderer.setBaseItemLabelGenerator(
new StandardCategoryItemLabelGenerator("{0} {2}", NumberFormat.getInstance(),NumberFormat.getNumberInstance()));
Upvotes: 1