Need To Generate Random Integer for Web Color

Need To Generate Random Integer for Web Color

  
I am currently using Fusion Chart at the forge and I need to dynamically generate category and values, as well as color code.

So far I can dynamically generate category and values, but I still hard coding the color. I am thinking of generate random integer (1 to 9) to plug it in to my code like this:

With a foreach loop then

value3 + "<set name='" + GetClensingRules.List.Current.ClensingRule.Why + "' value='" + GetClensingRules.List.Current.ClensingRule.Count + "' color='A" + RAND(1,9) + "D" + RAND(1,9) + "F" + RAND(1,9) + "' />"

There fore the color will be different. Unfortunately, I dont see if there is a built in function for random generating integer





David Chen wrote:
I am currently using Fusion Chart at the forge and I need to dynamically generate category and values, as well as color code.

So far I can dynamically generate category and values, but I still hard coding the color. I am thinking of generate random integer (1 to 9) to plug it in to my code like this:

With a foreach loop then

value3 + "<set name='" + GetClensingRules.List.Current.ClensingRule.Why + "' value='" + GetClensingRules.List.Current.ClensingRule.Count + "' color='A" + RAND(1,9) + "D" + RAND(1,9) + "F" + RAND(1,9) + "' />"

There fore the color will be different. Unfortunately, I dont see if there is a built in function for random generating integer




 
 
 Hi David,

Have you checked this component?
I think it does exactly what you're looking for!

Cheers,

RG