Setting backgrounds for charts |
FusionWidgets allows you to easily set a background image/movie for your chart. You can use this option to embed background images (GIF, JPEG or PNG), other SWF Files, or data tables (in image format) as your chart background. To embed an image, all you need to do is set bgSWF property of <chart> element as shown below. You can also dynamically change the transparency of the loaded image using bgSWFAlpha property, which accepts a value between 0 and 100. |
<chart bgSWF='ChartBG.jpg' caption='Sales distribution by Employee' subCaption='Jan 07 & Feb 07' baseFontC0lor='FFFFFF'> <set label='Buchanan' value='20000' /> <set label='Callahan' value='49000' /> <set label='Davolio' value='63000' /> <set label='Dodsworth' value='41000' /> <set label='Fuller' value='74000' /> </chart> |
In the above XML, we're loading a background image ChartBG.jpg by setting it as bgSWF attribute. If your image file is in a different location, you'll need to specify the full path. Also, due to security restrictions, your image file has to reside on the same sub-domain as chart SWF File. This is how the chart will look with the background image. |
Simple and effective - isn't it? For best results, you need to make sure that the background image and your chart have the same dimensions (width and height). Else, the loaded image would align at top left of the chart. |