Open hairpin86 opened 6 years ago
Hi,
My answer is a little late, but better late than never :D
Concerning question 1, you can pass a single number or an array of length 1 as data and set option "type" to "pie", "polar-radius" or "polar-area" and set "labels" to "auto". For instance:
L.minichart([0, 0], {data: 1234, type:"pie", labels:"auto"}).addTo(map)
gives:
Concerning the legend, it is not generated with this package. I have used the R package "leaflet" that generates interactive maps. It has a simple function "addLegend()" that generates the required javascript to display such legend.
There is a good tutorial for the legend here: https://leafletjs.com/examples/choropleth/
Hi,
First of all, thanks for this great plugin. I have 2 questions regarding your implementation:
1. How did you get to show Bubble Charts like here : https://github.com/rte-antares-rpackage/leaflet.minichart/blob/master/img/bubblecharts.png ?
Did you just pass one value into the data array? But how come you can add a String to the data and still have a dyamic Bubble size?
How did you add the legend like here: https://github.com/rte-antares-rpackage/leaflet.minichart/blob/master/img/barcharts.png ?