Sign in to follow this  
Metallica

Exporting Transparent Charts

Recommended Posts

Hey guys!

 

 

 

Well, mine is an easy question, is it possible to export a chart with transparent background? I can't achieve this even if I set the XML to export as a GIF image, or bgAlpha, etc etc..

 

 

 

Thanks!!

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Could you please try setting the background of the chart as transparent by setting "myChart.setTransparent(true);"

Ref.- <div id="chartdiv" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div>

<script type="text/javascript">

var myChart = new FusionCharts("../FusionCharts/Column3D.swf", "myChartId", "900", "300", "0", "0");

myChart.setDataURL("Data.xml");

myChart.setTransparent(true);

myChart.render("chartdiv");

</script>

</div>

Hope this helps.

Share this post


Link to post
Share on other sites

Hey guys!

 

 

 

That works ok, I mean, the chart shows up great in my web page with transparent background. The problem is when I export the chart as an image, that's where the background is white instead of transparent, how can I achieve this?

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

 

 

 

If the chart is set as transparent and if the bgColor is 000000, then on export the chart will not take the background color that is behind the chart, as it is not part of the chart.

 

 

 

This is also the case when the chart is rendered in window mode.

 

I'm afraid, as of now, we can not provide you with a workaround to impart the background color of the page to the chart on export.

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

You can load a background image for the chart using the bgSWF attribute in the <chart> element. This attribute you specify the URL (with full path) of the background image / SWF File. Make sure that the image and the chart SWF file are in the same sub-domain.

Now, you can control the transparency of this image using bgAlpha attribute.

 

Please refer to the link belwo for further details on this:

http://www.fusioncharts.com/docs/Contents/AttDesc/Background.html

Looking forward to your reply.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this