|
Pie Chart Background |
Posted by JC on Dec-05-2008 20:00 |
|
When i try to set the background colour to Transparent in the pie chart. The pie chart renders black?
Dim c As PieChart = New PieChart(400, 330, Chart.transparnet, &H000000, 1) |
Re: Pie Chart Background |
Posted by Peter Kwan on Dec-06-2008 01:20 |
|
Hi JC,
If you are using the charts in a web application, the black color is because ChartDirector by default does not output the alpha channel of the image. You need to use BaseChart.setTransparentColor to enable outputting of alpha channel.
If you intent to set the background color to Transparent, please note the followings:
(a) The IE 6 browser does not support transparency for true color images. It does not support alpha transparency at all. IE 6 only supports single color transparency in 256 color images.
(b) Both IE 7 and FireFox, as well as most professional graphics viewers (eg. PhotoShop) supports true color alpha transparency.
If you need to support IE 6, and you want the charts to be true color (instead of 256 colors), you may not want to use transparency. If you do not need to support IE 6, you may use true color transparency (method (b) above). If you need to support IE 6, but can accept 256-color images, you may use single color transparency.
The documentation for BaseChart.setTransparentColor contains the details on how to set the output mode for the above cases.
Hope this can help.
Regards
Peter Kwan |
|