Reputation: 81
Trying to change the color for a highcharter choropleth map, but all the obvious ways don't seem to do it. Example attempt:
mp <- highchart() %>%
hc_add_series_map(usgeojson, Kaiser_insurance_coverage_2016, name = "Female",
value = "Female", joinBy = c("woename", "Location")) %>%
hc_plotOptions(series = list(color = "#C5C889")) %>%
hc_legend(valueDecimals = 0, valueSuffix = "%",
verticalAlign = "top")
And then alternative attempt:
hcmap("custom/world-eckert3-highres",
data = mpw,
value = "FertilityRate",
joinBy = c("hc-a2", "hc-a2"),
name = "Fertility Rate",
dataLabels = list(enabled = TRUE, format = '{point.name}'),
borderColor = "#8C89C8",
color = "#C5C889",
borderWidth = 0.1,
tooltip = list(valueDecimals = 2, valuePrefix = "$", valueSuffix = " USD")) %>%
hc_title("Fertility Rate")
Thanks
Upvotes: 1
Views: 1117
Reputation: 81
Ok, I figured it out.
map %>% hc_colorAxis(minColor = "#C5C889", maxColor = "#434348")
Upvotes: 2