Hi Francisco,
I assume the "background image" you refer to is the background image of the chart (eg. added using something like BaseChart.setBgImage or PlotArea.setBackground2). In this case, you may simply use ColorAxis.setColorGradient to set the contour fill colors to semi-transparent colors. For example (in Java/C#):
int[] fillColors =
{
0x800000C0, 0x800000FF, 0x800030FF, 0x800060FF, 0x800090FF, 0x8000C0FF, 0x8000FFFF, 0x8030FFC0, 0x8060FF90, 0x8090FF60, 0x80C0FF30, 0x80FFFF00, 0x80FFCC00, 0x80FF8800, 0x80FF5500, 0x80FF0000
};
//layer = ContourLayer object
layer.colorAxis().setColorGradient(true, fillColors);
If the background is not related to ChartDirector (eg. is part of the HTML web page), you would also need to output the alpha channel, so that the browser knows how to compose the chart created by ChartDirector to the HTML web page background:
//ask ChartDirector to retain the alpha transparency when creating the PNG
c.setTransparentColor(-1);
Hope this can help.
Regards
Peter Kwan |