Dhruva

How to set data seris colors as dark colors by defualt

Recommended Posts

For data series colors, fusion chart setting colors by defualt for all legends. Is there a way i can tell fusionc charts to set all legend colors as dark colors by defualt without giving color ='fffffff' . i want fusion chart to set dark colors for legend by defualt.

Share this post


Link to post
Share on other sites

Hello sesi,

If you do not want to customize every element of the data plot/legend, you can choose to use the paletteColors attribute for the <chart> element. I quote from the relevant section of the documentaion:

While the palette attribute allows to select a palette theme that applies to chart background, canvas, font and tool-tips, it does not change the colors of data items (i.e., column, line, pie etc.). Using paletteColors attribute, you can specify your custom list of hex colors for the data items. The list of colors have to be separated by comma e.g., <chart paletteColors='FF0000,0372AB,FF5904...'>. The chart will cycle through the list of specified colors and then render the data plot accordingly.

To use the same set of colors throughout all your charts in a web application, you can store the list of palette colors in your application globally and then provide the same in each chart XML.

I hope this helps! :D We look forward to hearing from you.

Share this post


Link to post
Share on other sites

FusionCharts seems to disregard the paletteColors parameter. Is something wrong with my syntax? The code below is from the FC debugger, all the other parameters work fine. Version is 3.0.6. (the opening bracket made the line disappear in the preview so I switched it :D)

 

 

 


>chart bgColor="a7d3e8" 

canvasBgColor="ffffff" 

canvasBaseColor="ffffff" 

canvasBgAlpha="90" 

showPlotBorder="0" 

showLegend="1" 

baseFont="Verdana" 

baseFontSize="10" 

outCnvBaseFontSize="12" 

showBorder="0" 

[b]paletteColors="a7d3e8,e03e01,ffb81b,fafafa,61f32e"[/b]

palette="2" 

caption="test" 

xAxisName="x axis" 

yAxisName="y axis">

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