Basically I'm trying to make the tooltips stay around for a few seconds and not close when hovering on another region, i.e., to leave a trail of old open tooltips like in this example
Test data:
require(dplyr)
require(highcharter)
mapdata <- get_data_from_map(download_map_data("countries/us/us-all"))
set.seed(1234)
data_fake <- mapdata %>%
select(code = `hc-a2`) %>%
mutate(value = 1e5 * abs(rt(nrow(.), df = 10)))
hcmap("countries/us/us-all", data = data_fake, value = "value",
joinBy = c("hc-a2", "code"), name = "Fake data",
dataLabels = list(enabled = TRUE, format = "{point.name}"),
borderColor = "#FAFAFA", borderWidth = 0.1,
tooltip = list(valueDecimals = 2, valuePrefix = "$", valueSuffix = "USD",
hideDelay = 3, followPointer = F))
I found the option for hideDelay
, but is there an option to make the tooltip stay alive (without closing) when hovering another region? Is there an option for that, or maybe a custom tooltip function exists?
Alternatively, a solution with tooltip-on-click would help too, it there was an option specify that old tooltips wouldn't close upon another click.
tooltip.positioner
, here is the same without that; jsfiddle.net/ewolden/7bsx5zug. This is all that is needed in the example to disable hiding tooltip:Highcharts.Tooltip.prototype.hide = function () {};
– ewoldenmapIt('nf','Newfoundland and Labrador', 44,56 ,1.2,1.5, '10'); mapIt('pe','Prince Edward Island', 0,100 ,0,0.2, '30');
and so on, wheremapIt
is afunction mapIt(province, title, data1, data2, price1, price2, dis) { $('.'+province).highcharts
. Maybe that's the key? – runr