function tooltipIn()

in src/js/modules/choropleth.js [1338:1356]


        function tooltipIn(d) {
            d3.select(".tooltip").style("visibility", "visible");
            
            // Remove highlight from all paths
            d3.selectAll('.mapArea').classed('highlighted', false);
            // Add highlight to current path
            d3.select(this).classed('highlighted', true);

            if (d.properties[self.database.currentKey] === 0) {
                d.properties[self.database.currentKey] = "0";
                d3.select("#tooltip").html(mustache(self.database.mapping[self.database.currentIndex].tooltip, {...utilities, ...d.properties}));
            } else if (d.properties[self.database.currentKey] === undefined) {
                d3.select("#tooltip").html("No data available");
            } else {
                d3.select("#tooltip").html((d.properties[self.database.currentKey] === null) ? 
                    "No data available" : 
                    mustache(self.database.mapping[self.database.currentIndex].tooltip, {...utilities, ...d.properties}));
            }
        }