Setting colors for item labels (WaferMapRenderer)

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
hubes
Posts: 2
Joined: Wed May 19, 2010 12:44 pm
antibot: No, of course not.

Setting colors for item labels (WaferMapRenderer)

Post by hubes » Mon May 31, 2010 9:20 am

Hi,

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);
The default behavior of the WaferMapRenderer is also strange because the item label as well as the item marker is painted black so you cannot distinguish different fields of the wafer map. Is this a bug or am I doing something wrong (or missing somehting)?

Any help would be greatly appreciated.

Thanks and best regards,

- Stephan

Locked