Next
Update
Prev

You can fill different colors in the items of the panel using the fillJsFunction attribute. This example map chart demonstrates how to fill colors in the items using the JavaScript function which returns the color code based on the temperature value.

...
  <MapPanelSeries ... fillJsFunction="fillFunction" ... >
    ...
  </MapPanelSeries>
...

function fillFunction(seriesId, code, label, data) {
  if (data.temperature < 8)
    return "#FF0000";
  else if (data.temperature < 10)
    return "#FF6600";
  else if (data.temperature < 14)
    return "#FFCC00";
  else
    return "#FFFF00";
}

<MapPanelSeries>

fillJsFunction This property is to set the JavaScript function to be called to return the user-defined color.

© 2017 KoolChart. All rights reserved.