runfreely

Gradient In Fusioncharts V3

Recommended Posts

<chart bgColor='FF5904,FFFFFF' bgAlpha='100,100' bgRatio='0,100' bgAngle='0'>

<set label='John' value='420' />

<set label='Mary' value='295' />

<set label='Tom' value='523' />

</chart>

 

The xml means the color 'FF5904' would occupy 0% of the gradient fill and the color FFFFFF would occupy 100%.????

 

but the page shows all the colors. why??

 

In the FusionCharts V3 Documention "Using Gradients" section . The xml document of the example is above xml.

but why the color of the chart background has ‘FF5904‘and 'FFFFFF’ mixed.

Snap1.bmp

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

Welcome to FusionCharts Forum :)

 

Thank you for the post.

 

The xml means the color 'FF5904' would occupy 0% of the gradient fill and the color FFFFFF would occupy 100%.????

>> No.

 

but the page shows all the colors. why??

>> Allow me to explain the concept behind it :)

 

Ratio denotes the starting point of the color, so for two colors ratio will be "0,100" not "50,50" because 0 is the starting point for the first color and 100 is the starting point for the second color which will be mixed at 50's position.

 

Similarly, if the colors are FF0000 (Red), 00FF00 (Green), 0000FF (Blue), the ratio will be 0,50,50.

 

0, the 1st starting point of the color Red.

At this point, Red will be PURE Red.

 

50, second starting point for Green color.

Here Green will be PURE Green.

 

The 3rd 50, appears at 100th position (previous 50 + 50) which is the end point, so that, at this point the Blue will be PURE Blue.

 

Hope this helps !!

Edited by Bindhu

Share this post


Link to post
Share on other sites

Thank you for your reply.

 

 

if the colors are FF0000 (Red), 00FF00 (Green), 0000FF (Blue), FF0000 occupy 34% ( from 0 to 34),00FF00 occupy 34%( from 34 to 68) ,0000FF occupy 32 % (from 68 to 100)

 

the ratio will be "bgRatio='17,34,34' "

 

17, the 1st starting point of the color Red.

At this point, Red will be PURE Red.

 

17+34=51, the 2st starting point of the color Green.

At this point, Red will be PURE Green.

 

17+34+34=85, the 3st starting point of the color Blue.

At this point, Red will be PURE Blue.

What I said is right??

 

Thank you very much for your reply again.

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