Plotly.d3.json(‘https://raw.githubusercontent.com/plotly/datasets/master/florida-red-data.json’, function(redjson) {
Plotly.d3.json(‘https://raw.githubusercontent.com/plotly/datasets/master/florida-blue-data.json’, function(bluejson) {
Plotly.newPlot('myDiv', [{
type: 'scattermapbox',
lat: [46],
lon: [-74]
}], {
title: "Florida Counties",
height: 600,
width: 600,
mapbox: {
center: {
lat: 28,
lon: -84
},
style: 'light',
zoom: 4.8,
layers: [
{
sourcetype: 'geojson',
source: redjson,
type: 'fill',
color: 'rgba(163,22,19,0.8)'
},
{
sourcetype: 'geojson',
source: bluejson,
type: 'fill',
color: 'rgba(40,0,113,0.8)'
},
]
}
}, {
mapboxAccessToken: 'your access token'
});
});
});
I want to make a UK choropleth map using geojson, So I tried this plotly js choropleth map of florida. But info on hover is missing in this example. Is it possible show to info on hover in map made using geojson.