I have a set of data like this :
var data = [
['gl', 2584],
['sh', 100201],
['bu', 2025],
['lk', 30336],
['as', 41225],
['dk', 500],
['fo', 655225],
['gu', 7555],
['mp', 85454],
['um', 90147],
['us', 10087]]
I am normalizing the above array into the range of [0,1] to give different colours to High charts world map based on following conditions.
0.0-0.15 Green
0.15-0.30 yellow
0.30-0.60 orange
0.60-1 red
I want to set colours based on normalized array but show the labels from above data array. How can I do this ?
You can define an array of stops value with each color. Take a look at this demo: https://jsfiddle.net/BlackLabel/gbnd36zr/
colorAxis: {
min: 0,
stops: [
[0.15, 'green'],
[0.3, 'yellow'],
[0.6, 'orange'],
[1, 'red']
]
},