I'm trying to set the color for item labels in the legend but with no success.
Here's a code example:
Code: Select all
final JFreeChart chart = ChartFactory.createWaferMapChart(
"Wafer Map Demo", // title
dataset, // wafermapdataset
PlotOrientation.VERTICAL, // vertical = notchdown
true, // legend
true, // tooltips
false
);
WaferMapPlot plot = (WaferMapPlot) chart.getPlot();
WaferMapRenderer renderer = new WaferMapRenderer();
renderer.setSeriesItemLabelPaint(0, Color.red);
renderer.setSeriesItemLabelPaint(1, Color.blue);
plot.setRenderer(renderer);
Any help would be greatly appreciated.
Thanks and best regards,
- Stephan