CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
categoryAxis.setCategoryMargin(0.0);
ValueAxis valueAxis = new NumberAxis(valueAxisLabel);
WaterfallBarRenderer renderer = new WaterfallBarRenderer();
// FIXME create a new method for the horizontal version
// if (orientation == PlotOrientation.HORIZONTAL) {
// ItemLabelPosition position = new ItemLabelPosition(
// ItemLabelAnchor.CENTER, TextAnchor.CENTER,
// TextAnchor.CENTER, Math.PI / 2.0);
// renderer.setBasePositiveItemLabelPosition(position);
// renderer.setBaseNegativeItemLabelPosition(position);
// }
ItemLabelPosition position = new ItemLabelPosition(
ItemLabelAnchor.CENTER, TextAnchor.CENTER,
TextAnchor.CENTER, 0.0);
renderer.setDefaultPositiveItemLabelPosition(position);
renderer.setDefaultNegativeItemLabelPosition(position);
StandardCategoryToolTipGenerator generator
= new StandardCategoryToolTipGenerator();
renderer.setDefaultToolTipGenerator(generator);
CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, valueAxis,
renderer);
plot.clearRangeMarkers();
Marker baseline = new ValueMarker(0.0);