Next
Update
Prev

You can fill different colors in the regions of the map using the localFillJsFunction attribute. This example map chart demonstrates how to fill colors in the regions using the JavaScript function which returns the color code based on the code value and the sales value.

...
  <MapSeries ... localFillJsFunction="colorFunction">
    ...
  </MapSeries>
...

function colorFunction(code, label, data) {
  if (code == "1000" || data.sales < 30)
    return "#b0d1ff";
  else if (code == "9000" || data.sales < 50)
    return "#7fa9fe";
  else if (code == "15000" || data.sales < 90)
    return "#407efb";
  else
    return "#3057d4";
}

© 2017 KoolChart. All rights reserved.