I'm plotting results from various British elections in Leaflet and ran into a bit of a problem with legends.
For the various results in the general election I'm using the same colour function with different domain for the different data (the yellow-> purple scale in the picture)
This is created with (for the first two as examples):
labvotescols <- colorNumeric(
c("Yellow", "Purple"),
domain = Westminster$LabourVotes,
ukipvotescols <- colorNumeric(
c("Yellow", "Purple"),
domain = Westminster$UKIPVotes,
and so on...
Currently I have the legend
map = map %>% addLegend("bottomright", pal = ukipvotescols, values = Westminster$UKIPVotes,
title = "(e.g.) % voting UKIP at GE2015",
opacity = 1)
as one example of this, but really I'd like to get rid of all the values on the legend and just have "less" at the yellow end and "more" at the purple end. Is this possible?
I tried playing around and then googling but to no avail.