We have requirement to create horizontal bar chart with one category and 1-3 series. The label of each series should be positioned at the left most of the bar and the value at the right most. Something like below:

So far I've come up with the following snippet:
Code: Select all
final CategoryDataset dataset = DatasetUtils.createCategoryDataset(new String[]{"Power"}, new String[]{""}, new double[][]{{100d}});
final JFreeChart chart = ChartFactory.createBarChart(null, null, null, dataset, PlotOrientation.HORIZONTAL, false, true, false);
final CategoryPlot plot = chart.getCategoryPlot();
plot.getRangeAxis().setVisible(false);
Any help would be greatly appreciated.
Regards,
Mike.