Sign in to follow this  
bmcwhorter

Line Area Chart Not Displaying Correct Colors In Javascript

Recommended Posts

Hi, 

 

Using this defintion, the area under the line is green in flash but grey in javascript.  Are you all aware of this problem?  Is there a workaround I can use?  I need both charts to look the same.

 

Thanks.

 

 

 
<?xml version="1.0" encoding="UTF-8"?>
-<graph lineDashed="0" useRoundEdges="0" rotateValues="1" showValues="0" divLineColor="000000" canvasBgColor="dad9da" rotateLabels="1" xaxisname="X-Axis" yaxisname="Y-Axis" imageSaveURL="rdTemplate/rdAnimatedChart/FCExporter.aspx" imageSave="1" unescapeLinks="0" showBorder="0" chartBottomMargin="" chartTopMargin="" chartRightMargin="" chartLeftMargin="" numberPrefix="" showLabels="1" bgColor="ffffff" Caption="" animation="1" showFCMenuItem="0"> -<styles> -<definition> <style type="font" color="5b5b5b" size="11" font="Helvetica" name="DataLabelsFontStyle"/> <style type="font" color="5b5b5b" size="11" font="Helvetica" name="YAXISVALUESFontStyle"/> <style type="font" color="5b5b5b" size="11" font="Helvetica" name="LegendFontStyle"/> </definition> -<application> <apply styles="DataLabelsFontStyle" toObject="DataLabels"/> <apply styles="YAXISVALUESFontStyle" toObject="YAXISVALUES"/> <apply styles="LegendFontStyle" toObject="Legend"/> </application> </styles> <set color="008000" alpha="100" label="Dairy Products" value="115387.6500"/> <set color="008000" alpha="100" label="Beverages" value="103924.3100"/> <set color="008000" alpha="100" label="Confections" value="82657.7300"/> <set color="008000" alpha="100" label="Meat/Poultry" value="80975.1200"/> <set color="008000" alpha="100" label="Seafood" value="66959.2100"/> <set color="008000" alpha="100" label="Grains/Cereals" value="56871.8200"/> <set color="008000" alpha="100" label="Condiments" value="55368.6000"/> <set color="008000" alpha="100" label="Produce" value="54940.7600"/> <trendlines/> </graph>

Share this post


Link to post
Share on other sites

Hey,

 

JavaScript charts does not accepts color attribute at set element level.To obtain a similar chart, you will have to pass "plotFillColor" attribute in the chart element.

 

Ref. Code:

<chart .... plotFillColor='008000">

 

Please Note: Please use <chart> element instead of <graph> element.

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