I implemented a code to represent a bar chart (as of picture). Now my problem is that I want to add $ sign to the values to represent the currencies. So that the values would be:
$0 ---- $500,000 ----- $1,000,000
Any idea?
I implemented a code to represent a bar chart (as of picture). Now my problem is that I want to add $ sign to the values to represent the currencies. So that the values would be:
$0 ---- $500,000 ----- $1,000,000
Any idea?
Thanks. Exactly that's what I found as well
final CategoryPlot plot = chart.getCategoryPlot();
NmberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
DecimalFormat format = new DecimalFormat("$##,###,###,###");
rangeAxis.setNumberFormatOverride(format);