简体   繁体   中英

How to add barchart markers in Leaflet.js?

i want to add barchart marker in my map. How is the script for that? i tried to find any of them in the internet but it didnt work.

You can use Leaflet-Minichart

You can add the library with:

<script src="https://unpkg.com/leaflet.minichart/dist/leaflet.minichart.min.js" charset="utf-8"></script>

var barChartMarker = L.minichart(map.getCenter(), {data: [1,2,3]}).addTo(map)

https://jsfiddle.net/falkedesign/L8s1j6nw/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM