DWalKr Report post Posted May 6, 2010 (edited) Hi, is it possible to set the background for a transparent chart during the export? and if yes, how? After the capture, there is a stream generated, which contains the colors of every pixel. If you put them together, you have a pretty ugly result because of the outer texts (hardly readable). So I would like to modify the FusionChartsExportComponent.js (I assume it would be the place to make the changes) so that the generated stream already contains a background color. Here is a sample from the stream as I use it to put the picture together: 'stream' => '_424;_424;_424;_424;_424;_424;_424;_424;_424;_424;_424;_38,fdfdfd_3,_5, fdfdfd_6,_2,fefefe_1,fdfdfd_4,fefefe_1,_6,fefefe_1,fdfdfd_4,fefefe_1,_2, fefefe_1,fdfdfd_4,fefefe_1,_2,fefefe_1,fdfdfd_4,fefefe_1,_274,fdfdfd_5,_8, fdfdfd_2,_3,fefefe_1,fdfdfd_4,fefefe_1,_38;_40,fdfdfd_1,_5,fdfdfd_6,_2, fdfdfd_6,_6,fdfdfd_6,_2,fdfdfd_6,_2,fdfdfd_6,_273,fdfdfd_6,_7,fdfdfd_3, _3,fdfdfd_6,_38;_ .....' the separator for the rows is ';' separator for the columns is ',' you have first the color and then the number of following pixels with this color. No color specified means the followings pixels had the background color (transparent) trying to set a custom bgColor while putting the picture together just generate a ugly picture. maybe someboy knows how I can set this bgColor before I get the stream. Thx Edited May 6, 2010 by Guest Share this post Link to post Share on other sites
shamasis Report post Posted May 12, 2010 Speaking from an architectural perspective, the correct way to achieve what you need should not involve hacks of FusionChartsExportComponent.js Furthermore, if you start with updating the stream generated from the chart, you will have anti-aliasing issues and mismatched matte effects - exactly like the "ugly result" you are getting. You should rather try implementing this algorithm: 1: Just before calling export function on the chart - 1.1: getXML() from the chart and store it somewhere. 1.2: Create a new XML from above (1.1) and modify the <chart> element to have animation='0' property 1.3: Re-render the chart by setting new bgColor and new XML from above (1.2) 1.4: When FC_Rendered is called after 1.3, export the chart. 2: Once export completes and you get a completion call-back event - 2.1: Re-Render the chart by setting original bgColor and modified XML with animation=0 (1.2) Share this post Link to post Share on other sites