Sign in to follow this  
steveddei

Get line/bar color with Javascript

Recommended Posts

I am using FC 3 with php class. I am using the default color scheme (i dont define it in my chart tag)and would like to use javascript to get the color of the line/bars in the chart to use in certain places in my html.

How can i uses javascript to get the color attributes from a chart?

Share this post


Link to post
Share on other sites
Guest Rajroop

Hello,

You can get all the attributes that are defined in <chart> element but not in <set> or <dataset> elements. So, you can retreive bgcolor, canvasbgcolor, paletteColor attributes. However, you cannot get the color attributes from <set> or <dataset> element. :(

I hope this helps.

Share this post


Link to post
Share on other sites

I have created my own grid table to be display below the actual fusion chart. I would have used the ssgrid.swf, but unfortunately there is almost no layout customization, as i needed it to be horizontally listed instead of the fixed vertically view.

Anyways, I am using an html table so i guess it looks like the only way to share colors would be to define the color in the <chart> and then use the same in my html table.

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