Reputation: 11
I want to set up only 4 colors for all country in Geo Chart
const colors = ["#D7D8D9", "#FCB8C9", "#FE557F", "#661529"]
Geo - chart always shows some gradient for each country from first color to last color by range
I want to remove this gradient and I want to show country on the world map with specific color by range
For example -
const options = {
colorAxis: {
ranges: [
{
min: 2,
max: 498,
color: "#D7D8D9",
},
{
min: 498,
max: 995,
color: "#D7D8D9",
},
{
min: 995,
max: 1491,
color: "#D7D8D9",
},
{
min: 1491,
max: 1987,
color: "#D7D8D9",
},
],
},
legend: "none",
};
This variant doesn't work and I don't know how I can do it
Also I tried next -
const options = {
colorAxis: {
ranges: [
{
min: 2,
max: 498,
color: color[0],
},
{
min: 498,
max: 995,
color: color[1],
},
{
min: 995,
max: 1491,
color: "color[2]",
},
{
min: 1491,
max: 1987,
color: color[3]",
},
],
},
legend: "none",
};
It doesn't work as expected
Upvotes: 1
Views: 45