Sign in to follow this  
mayur

set min value at end in color range for mapwithcountries fusioncharts

Recommended Posts

I have a set of data for different countries in following way

dataset : [10, 45, 20, 70, 55, 100, 150, 200, 232, 2]

i want to set the color range for these countries but want max value in legend  as 100

scrollbar 0 to 100

so i have set the color range in following way

0 to 25:red

25 to 50:yellow

50 to 100:green

expected : if any value is greater than 100; than  the color should be green.

current scenario : if value is greater than 100 default null color is applied.

is there any settings where we could map values to max values even if current value for a country is greater than max value specified in color range object.
 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Hi Mayur,

 

Yes, you can achieve your stated requirement with the help of a JavaScript function, that will modify your dataSource for those data objects having values greater than 100. That is, the "color" attribute only for the data object value greater that 100 will be set to GREEN.

 

Then render the chart with the modified dataSource.

Please check a sample fiddle implementing the above technique : http://jsfiddle.net/Akash008/3a5txvtt/

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