{"id":13572767,"url":"https://github.com/rte-antares-rpackage/leaflet.minichart","last_synced_at":"2025-07-19T22:38:41.222Z","repository":{"id":83451407,"uuid":"76666195","full_name":"rte-antares-rpackage/leaflet.minichart","owner":"rte-antares-rpackage","description":"Leaflet.minichart is a leaflet plugin for adding to a leaflet map small animated charts","archived":false,"fork":false,"pushed_at":"2020-08-26T07:44:36.000Z","size":3212,"stargazers_count":33,"open_issues_count":11,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-10T09:46:45.255Z","etag":null,"topics":["barchart","chart","d3-charts","dynamic","javascript","leaflet","map","maps","rte"],"latest_commit_sha":null,"homepage":"https://rte-antares-rpackage.github.io/leaflet.minichart/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rte-antares-rpackage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-12-16T15:56:19.000Z","updated_at":"2025-03-05T10:24:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"e14b1b34-27d3-42ad-92fc-a04cfb0ae881","html_url":"https://github.com/rte-antares-rpackage/leaflet.minichart","commit_stats":{"total_commits":76,"total_committers":4,"mean_commits":19.0,"dds":0.07894736842105265,"last_synced_commit":"be4b475ece8414151b1755bd55ecd9b3f4d11543"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rte-antares-rpackage/leaflet.minichart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rte-antares-rpackage%2Fleaflet.minichart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rte-antares-rpackage%2Fleaflet.minichart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rte-antares-rpackage%2Fleaflet.minichart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rte-antares-rpackage%2Fleaflet.minichart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rte-antares-rpackage","download_url":"https://codeload.github.com/rte-antares-rpackage/leaflet.minichart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rte-antares-rpackage%2Fleaflet.minichart/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264988516,"owners_count":23694016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barchart","chart","d3-charts","dynamic","javascript","leaflet","map","maps","rte"],"created_at":"2024-08-01T15:00:19.317Z","updated_at":"2025-07-19T22:38:41.164Z","avatar_url":"https://github.com/rte-antares-rpackage.png","language":"CSS","funding_links":[],"categories":["Leaflet Functions"],"sub_categories":["Mini Chart"],"readme":"[![NPM](https://nodei.co/npm/leaflet.minichart.png)](https://nodei.co/npm/leaflet.minichart/)\n\n# Leaflet.minichart\n\nLeaflet.minichart is a leaflet plugin for adding to a leaflet map small animated bar charts, pie charts or polar area charts.\n\nIt can be used to visualize multiple variables associated to geographical coordinates and to look at the evolution of these variables.\n\nHere are screenshots of some maps that use this plugin.\n\n![](img/piecharts.png)\n![](img/barcharts.png)\n![](img/bubblecharts.png)\n\nThis plugin is also available as an [R package](https://github.com/rte-antares-rpackage/leaflet.minicharts).\n\n## Usage\n\nYou need to include the `leaflet` CSS and javascript files and then the `leaflet.minichart` javascript file in the head section of your document:\n\n``` xml\n\u003clink rel=\"stylesheet\" href=\"https://unpkg.com/leaflet@1.0.2/dist/leaflet.css\" media=\"screen\" title=\"leaflet\"\u003e\n\u003cscript src=\"https://unpkg.com/leaflet@1.0.2/dist/leaflet.js\" charset=\"utf-8\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/leaflet.minichart/dist/leaflet.minichart.min.js\" charset=\"utf-8\"\u003e\u003c/script\u003e\n```\n\nOnce these files included, you can create charts with function `L.minichart()`. All parameters are described [here](https://rte-antares-rpackage.github.io/leaflet.minichart/-_L.Minichart_.html).\n\n## Example\n\nHere is a sample code that initializes a map and adds to it a barchart that represents three random values. Then the code updates the value every two seconds and redraws the chart.\n\n``` javascript\nvar center = [48.861415, 2.349326];\n\nvar mymap = L.map('map').setView(coord, 13);\nL.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(mymap);\n\n// Let us generate fake data\nfunction fakeData() {\n  return [Math.random(), Math.random(), Math.random()];\n}\n\n// Create a barchart\nvar myBarChart = L.minichart(center, {data: fakeData()});\nmymap.addLayer(myBarChart);\n\n// Update data every 2 seconds\nsetInterval(function() {\n  myBarChart.setOptions({data: fakeData()})\n}, 2000);\n```\n\n![Example of a barchart on a map](img/example_barchart.gif)\n\nYou can find more complete examples here:\n* [International comparison of PISA scores](https://rte-antares-rpackage.github.io/leaflet.minichart/tutorial-PISA%20scores.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frte-antares-rpackage%2Fleaflet.minichart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frte-antares-rpackage%2Fleaflet.minichart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frte-antares-rpackage%2Fleaflet.minichart/lists"}