ChartDirector Ver 4.0 (Perl Edition)

BaseChart.setTransparentColor


Usage

setTransparentColor(c)

Description

Sets the transparency format in the output image.

Specifies a certain color to represent the transparent color when writing the DrawArea to an image file.

Whereas ChartDirector supports alpha transparency coloring, most browsers cannot display alpha transparency images correctly. So by default, ChartDirector will not include the alpha transparency channel in final output.

Instead, most browsers support another kind of transparency - single color transparency - in which one color is designated as totally transparent. The setTransparentColor method allows you to specify that color.

If you do want to include the alpha transparency channel in final output, you may pass -1 as the argument to setTransparentColor.

Note that this method only applies to image formats that support transparency (GIF and PNG for single color transparency, and PNG for alpha transparency). It is ignored for image formats that do not support transparency.

Arguments

ArgumentDefaultDescription
c(Mandatory)The color that is designated as the transparent color. If -1 is used, the full alpha transparency channel will be included in the final output.

Return Value

None