princej88

Gradient Legend On All Maps

Recommended Posts

Hi,

 

Is the gradient legend supported on all maps? I was only able to get the gradient legend to work with the USA map. If it is support across other maps, is there an example somewhere of it? Thanks ahead of time for the help!

 

Thanks,

Prince

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

Yes, gradient is supported for all the maps.

 

The gradient will work only when all the entity values fall under the gradient range.

 

For more information, please refer the following link:

http://docs.fusioncharts.com/maps/Contents/?how_to_use/gradientlegend.html

 

Also, find attached screen-shot for your reference.

 

Hope this helps!

post-24802-0-31220700-1359546366_thumb.png

Share this post


Link to post
Share on other sites

Hi, Thanks for the prompt reply. I am trying to get the gradient legend working with the austria map with no luck. Here is my code:

 

<html>
<head>
	<title>Fusionmaps Testing</title>
	<script type="text/javascript" src="/approot/js/FusionCharts.js"></script>
</head>
<body>
	<div id="mapdiv" align="center">
		Fusionmaps will load here.
	</div><!--mapdiv-->
	<script type="text/javascript">
		var map = new FusionCharts("/approot/fusionmaps/FCMap_Austria.swf", "Map1ID", "750", "460", "0", "0");
		map.setJSONData({
 "map": {
   "bordercolor": "FFFFFF",
   "connectorcolor": "000000",
   "fillalpha": "70",
   "hovercolor": "FFFFFF",
   "showbevel": "0",
"interactiveAnimation" : "1",
"interactiveAnimDuration" : "1",
"enableSnapLegend": "1"
 },
 "colorrange": {
   "gradient": "1",
   "minvalue": "0",
   "code": "CC0001",
   "startlabel": "Bad",
   "endlabel": "Very Good",
   "color": [
     {
       "maxvalue": "33",
       "displayvalue": "Poor",
       "code": "FF0000"
     },
     {
       "maxvalue": "66",
       "displayvalue": "Average",
       "code": "FFCC33"
     },
     {
       "maxvalue": "100",
       "code": "069F06"
     }
   ]
 },
 "data": [
{
	"id" : "01",
	"value" : "10"    
},
{ 
	"id" : "02",
	"value" : "80"    
},
{ 
	"id" : "03", 
	"value" : "20"
},
{ 
	"id" : "04",
	"value" : "30"
},
{
	"id" : "05",
	"value" : "10"
},
{ 
	"id" : "06",
	"value" : "20"
},
{
	"id" : "07",
	"value" : "20"
},
{
	"id" : "08",
	"value" : "10"
},
{
	"id" : "09",
	"value" : "10"
   }
 ],
 "styles": {
   "definition": [
     {
       "type": "animation",
       "name": "animX",
       "param": "_xscale",
       "start": "0",
       "duration": "1"
     },
     {
       "type": "animation",
       "name": "animY",
       "param": "_yscale",
       "start": "0",
       "duration": "1"
     }
   ],
   "application": [
     {
       "toobject": "PLOT",
       "styles": "animX,animY"
     }
   ]
 }

		});
		map.render("mapdiv");
	</script>

</body>
</html>

 

I have also attached a screenshot of my output.

Any idea what I might be doing wrong here? Thanks ahead of time for the help.

 

Thanks,

Prince

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

Yes, gradient is supported for all the maps.

 

The gradient will work only when all the entity values fall under the gradient range.

 

For more information, please refer the following link:

http://docs.fusionch...ientlegend.html

 

Also, find attached screen-shot for your reference.

 

Hope this helps!

post-29915-0-87104800-1359558044_thumb.jpg

Edited by princej88

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