0
I’m trying to put together a map of the state of Espírito Santo, where you click on the city and can access the content for each municipality. I found a framework (Fusioncharts) that I managed to do this, but I can’t get it right as I pass the values so that each city on the map is clickable. Link: (http://www.danieldias.info/projetos/acidentesflorestais/)
<script type="text/javascript" src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.js"></script>
<!-- Including the map renderer file -->
<script type="text/javascript" src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.maps.js "></script>
<!-- Including the map definition file -->
<script type="text/javascript" src="fusioncharts.espiritosanto.js"></script>
<!-- Including the fusion theme -->
<script type="text/javascript" src="https://cdn.fusioncharts.com/fusioncharts/latest/themes/fusioncharts.theme.fusion.js"></script>
<script type="text/javascript">
FusionCharts.ready(function() {
var annualPopulation = new FusionCharts({
"type": "maps/espiritosanto",
"renderAt": "chart-container",
"width": "100%",
"height": "430",
"dataFormat": "json",
"dataSource": {
// Map Configuration
"chart": {
//"caption": "Índice de Acidentes Florestais no Espirito Santo",
//"subcaption": " 1955-2015",
"numbersuffix": "%",
"includevalueinlabels": "1",
"labelsepchar": ": ",
"entityFillHoverColor": "#27ae60",
"theme": "fusion"
},
// Aesthetics; ranges synced with the slider
/*"colorrange": {
"minvalue": "0",
"code": "#27ae60",
"gradient": "1",
"color": [{
"minvalue": "0.5",
"maxvalue": "1.0",
"color": "#FFD74D"
}, {
"minvalue": "1.0",
"maxvalue": "2.0",
"color": "#FB8C00"
}, {
"minvalue": "2.0",
"maxvalue": "3.0",
"color": "#E65100"
}]
},*/
"data": [{
"id":"AC",
"label":"Afonso Cláudio",
"link" : "estado.html"
}, ]
}
});
annualPopulation.render();
});
</script>
Important [edt] and reduce the problem to a [mcve] of specific doubt, always taking into account the site scope. Links to better understand how Sopt works: [Tour], [Ask], Manual on how NOT to ask questions and [Help].
– Bacco