If you want to display only 3 countries, there are two methods you can try out.
- First option is to update the jvectormap-world-mill file by including only the countries of your interest. This way, jvector will show only those specific countries. You can still utilize markers with this method.
- Alternatively, you can use a standard world map and distinguish the 3 countries you want to highlight by giving them a contrasting color while coloring the rest in white or light grey.
The default color setting is as follows:
regionStyle: {
initial: {
//Default color for countries (light grey)
fill: '#E5E5E5',
}
}
To specify colors for your chosen countries, use this code:
series: {
regions: [{
//Color for Dark countries
scale: ['#bac0c6', '#9f2742'],
normalizeFunction: 'linear',
values: regions.reduce(function(p, c){
p[c.name] = c.status;
return p;
},{}
),
}]
}
The regions data is defined like so:
var regions = [
{name: 'AT', status: 0, link:'disable'},
On my blog at , I have implemented the second approach. Feel free to explore the code if you need clarification. I am using multiple colors to represent countries, hence the use of the reduce function. However, you can opt for simpler assignment of values if needed.