{"id":13941949,"url":"https://github.com/rte-antares-rpackage/minicharts","last_synced_at":"2025-07-29T15:31:29.578Z","repository":{"id":57297755,"uuid":"81467857","full_name":"rte-antares-rpackage/minicharts","owner":"rte-antares-rpackage","description":"minicharts : easily add mini animated charts","archived":false,"fork":false,"pushed_at":"2017-08-16T08:05:59.000Z","size":2371,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-10T07:05:29.025Z","etag":null,"topics":["javascript","rte"],"latest_commit_sha":null,"homepage":"https://rte-antares-rpackage.github.io/minicharts/","language":"JavaScript","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}},"created_at":"2017-02-09T16:03:10.000Z","updated_at":"2024-12-28T23:48:37.000Z","dependencies_parsed_at":"2022-09-01T08:40:55.958Z","dependency_job_id":null,"html_url":"https://github.com/rte-antares-rpackage/minicharts","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rte-antares-rpackage/minicharts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rte-antares-rpackage%2Fminicharts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rte-antares-rpackage%2Fminicharts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rte-antares-rpackage%2Fminicharts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rte-antares-rpackage%2Fminicharts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rte-antares-rpackage","download_url":"https://codeload.github.com/rte-antares-rpackage/minicharts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rte-antares-rpackage%2Fminicharts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267709570,"owners_count":24131914,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["javascript","rte"],"created_at":"2024-08-08T02:01:37.435Z","updated_at":"2025-07-29T15:31:28.999Z","avatar_url":"https://github.com/rte-antares-rpackage.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![NPM](https://nodei.co/npm/minicharts.png)](https://nodei.co/npm/minicharts/)\n\n\n[![Travis Build Status](https://travis-ci.org/rte-antares-rpackage/minicharts.svg?branch=master)](https://travis-ci.org/rte-antares-rpackage/minicharts)\n[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/an0e7b7dnd1ai2ex?svg=true)](https://ci.appveyor.com/project/rte-antares-rpackage/minicharts)\n[![codecov](https://codecov.io/gh/rte-antares-rpackage/minicharts/branch/master/graph/badge.svg)](https://codecov.io/gh/rte-antares-rpackage/minicharts)\n\n# minicharts.js: easily add mini animated charts\n\n`minicharts.js` is a javascript library to add easily compact animated charts in an html page. This can be especially usefull when you want to include many similar charts in a limited space like a table, a map or a complex chart.\n\n![](img/example.gif)\n\nThe full documentation is available [here](https://rte-antares-rpackage.github.io/minicharts/index.html).\nYou can also test the library on [JsFiddle](https://jsfiddle.net/fguillem/paar6yeg/).\n\n## Usage\n\nFirst include the script in your html pages:\n```xml\n\u003cscript src=\"https://unpkg.com/minicharts@0.1.1/dist/minicharts.min.js\"\u003e\u003c/script\u003e\n```\nThis adds a global object called `minicharts`. Alternatively you can install the library with `npm` and use it with:\n```javascript\nvar minicharts = require(minicharts);\n```\n\nNext add to your html an element that will contain the chart and that can be easily selected with a CSS selector. For instance:\n```xml\n\u003cspan id=\"mychart\"\u003e\u003c/span\u003e\n```\n\nIn your javascript, create the desired chart:\n```javascript\nvar mychart = new minicharts.Barchart(\"#mychart\", [1, 2, 3]);\n```\n![](img/barchart.png)\n\n## Customize your charts\nFor now three chart types are available: [`Barchart`](https://rte-antares-rpackage.github.io/minicharts/Barchart.html), [`Piechart`](https://rte-antares-rpackage.github.io/minicharts/Piechart.html) and [`Polarchart`](https://rte-antares-rpackage.github.io/minicharts/Polarchart.html). Their constructor take the same parameters:\n* A CSS selector\n* An array containing values to represent\n* An optional object containing graphical options for your chart like width, height, colors, etc.\n\nHere is an example:\n```javascript\nvar opts = {\n  colors: [\"#2B303A\", \"#92DCE5\", \"#EEE5E9\"],\n  width:100,\n  labels: \"auto\",\n  maxValue: 3 // Important if you want to compare charts\n};\nvar mychart = new minicharts.Polarchart(\"#mychart\", [1, 2, 3], opts);\n```\n![](img/custom_polarchart.png)\n\n## Update a chart\n\nCharts object have methods `setData` and `setOptions` to update respectively data and graphical options. Here is the code use to generate the example at the top of the document:\n\n```javascript\nvar opts = {\n  width:360,\n  height:120,\n  labels: \"auto\",\n  maxValue: 100\n};\n\nfunction fakeData(n) {\n  var res = [];\n  for (var i = 0; i \u003c n; i++) res.push(Math.random() * 100);\n  return res;\n}\n\nvar mychart = new minicharts.Barchart(\"#mychart\", fakeData(6), opts);\nsetInterval(function(){mychart.setData(fakeData(6))}, 1000);\n```\n\n## Contributing:\n\nContributions to the library are welcome and can be submitted in the form of pull requests to this repository.\n\n## License Information:\n\nCopyright 2015-2016 RTE (France)\n\n* RTE: http://www.rte-france.com\n\nThis Source Code is subject to the terms of the GNU General Public License, version 2 or any higher version. If a copy of the GPL-v2 was not distributed with this file, You can obtain one at https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html.\n\nThe minicharts library includes code of other open-source libraries (full copies of the license agreements used by these components are in the LICENCE file):\n\n- d3, https://github.com/d3/d3\n- tinycolor2, https://github.com/bgrins/TinyColor\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frte-antares-rpackage%2Fminicharts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frte-antares-rpackage%2Fminicharts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frte-antares-rpackage%2Fminicharts/lists"}