can you please suggest what i can do in that so that it will not change color on hover of bubble.
Code: Select all
import React, { useEffect, useState } from 'react';
import Highcharts from 'highcharts';
import HighchartsReact from 'highcharts-react-official';
import hcMap from 'highcharts/modules/map';
import proj4 from "proj4";
import mapDataUSA from "@highcharts/map-collection/countries/us/us-all.geo.json";
hcMap(Highcharts);
if (typeof window !== "undefined") {
window.proj4 = window.proj4 || proj4;
}
let mapOptions = {
chart: {
backgroundColor: 'transparent',
type: 'map',
map: 'countries/us/us-all',
},
title: {
text: null,
},
credits: {
enabled: false
},
mapNavigation: {
enabled: false,
enableButtons: false,
},
navigation: {
buttonOptions: {
enabled: false,
},
},
credits: {
enabled: false,
},
tooltip: {
// headerFormat: "",
// pointFormat: "lat: {point.lat}, lon: {point.lon}",
formatter: function () {
return (
'<b>' + this.point.options.keyword + '</b><br/>' + this.point.options.z
);
},
},
legend: {
enabled: false,
},
series: [
{
// Use the gb-all map with no data as a basemap
name: "US Map",
mapData: mapDataUSA,
borderColor: '#FFFFFF',
nullColor: '#E4E7EC',
showInLegend: false,
states: {
hover: {
color: null,
borderColor: null,
},
},
},
{
// Specify points using lat/lon
type: "mapbubble",
name: "Locations",
states: {
hover: {
color: null,
borderColor: null,
},
},
color: "#2E90FA",
data: [
// { z: 10, keyword: "Massachusetts", lat: 42.40, lon: -71.38},
// { z: 20, keyword: "Washington", lat: 47.48, lon: -120.36},
// { z: 30, keyword: "California", lat: 36.74, lon: -119.59},
// { z: 40, keyword: "Oregon", lat: 43.83, lon: -120.38},
{ z: 79, keyword: "North East", lat: 43.29, lon: -74.21 },
{ z: 49, keyword: "South East", lat: 63.96, lon: -143.62 },
{ z: 26, keyword: "Mid West", lat: 37.93, lon: -90.17 },
{ z: 21, keyword: "South West", lat: 32.31, lon: -110.92 },
{ z: 15, keyword: "West Coast", lat: 47.75, lon: -121.09 },
{ z: 19, keyword: "Unassiged", lat: null, lon: null },
],
cursor: "pointer",
point: {
events: {
click: function () {
console.log(this.keyword);
}
}
},
}
]
};
function USAMapBubbleChart() {
return (
<HighchartsReact
containerProps={{ style: { height: 'auto', width: '100%' } }}
highcharts={Highcharts}
constructorType={'mapChart'}
options={mapOptions}
/>
);
};
export default USAMapBubbleChart