| If I were outputting a Flash file |
Just to confirm, you are using format="flash", not png or jpg?
Update: Well, it seems I was wrong. I have tried a number of settings in the webcharts utility but the "transparent" background setting does not seem to do much, not even for png's. Even if you save the generated chart html for a flash chart, and dynamically add the "wmode" parameter, the outer background becomes transparent but there is still a hazy white background around the inner chart.
I figured it out. At least for pie charts. You will need to use a custom style and tweak the chart output to add "wmode".
Style File: transparent_pie.xml
Instructions:
1. Make a copy of "C:\ColdFusion8\charting\styles\default_pie.xml" and save it to the same directory as your cfm script as "transparent_pie.xml".
2. Add the "background" property towards the bottom of the file
....
</elements>
<background type="Transparent"/> << ----- Add background here
<popup background="#C8FFFFFF" foreground="#333333"/>
...
3. Use the style file to generate the chart
<cfsavecontent variable="chartOutput">
<cfchart format="flash" style="transparent_Pie.xml">
<cfchartseries type="pie">
<cfchartdata item="Yes" value="750">
<cfchartdata item="No" value="550">
</cfchartseries>
</cfchart>
</cfsavecontent>
<!--- add "wmode" parameter to OBJECT tag --->
<cfset newParam = '<param name="wmode" value="transparent">'>
<cfset newOutput = reReplaceNoCase(chartOutput, "(<OBJECT [^>]+>)", "\1"& newParam, "all")>
<!--- add "wmode" attribute to EMBED tag. note extra space characters --->
<cfset newParam = 'wmode="transparent"'>
<cfset newOutput = reReplaceNoCase(newOutput, "(<EMBED [^>]+)", "\1 "& newParam &" ", "all")>
<div style="background-color: #ff0000;">
<cfoutput>
#newOutput#
</cfoutput>
</div>