Next
Update
Prev

The label on the map can be customized using the labelJsFunction attribute. This example map chart demonstrates how to customize the label using the JavaScript function.

...
  <MapSeries ... labelJsFunction="labelFunction" ... >
    ...
  </MapSeries>
...

function labelFunction(seriesId, code, label, data) {
  if (code == "1000")	
    return {"text":"AL", "color":"#FF0000", "fontSize":15, "fontWeight":"bold"};
  else if (code == "7000")
    return {"text":"Conn", "color":"#FF0000", "fontSize":15, "fontWeight":"bold"};
  else if (code == "20000" || code == "21000")	
    return {"text":" "};
  else if (code == "22000")	
    return {"text":"Michigan", "fontSize":13, "fontWeight":"bold", "fontStyle":"italic", "fontFamily":"Apollo"};
  else if (code == "29000")	
    return {"text":"N.H", "color":"#FF0000", "fontSize":13, "fontWeight":"bold", "fontStyle":"italic", "fontFamily":"Apollo"};
  else if (code == "37000" || code == "39000" || code == "45000" || code == "48000" || code == "51000")	
    return {"text":" "};
		
  return label;
}

<MapPanelSeries>

titleJsFunction This property is to set the JavaScript function to be called to return the user-defined panel title.

© 2017 KoolChart. All rights reserved.