{"id":17996882,"url":"https://github.com/seogeurim/donut-chart-js","last_synced_at":"2025-07-15T17:38:07.718Z","repository":{"id":57215157,"uuid":"390568050","full_name":"Seogeurim/donut-chart-js","owner":"Seogeurim","description":"Simple Donut Chart using JavaScript and HTML5 Canvas 🍩","archived":false,"fork":false,"pushed_at":"2021-08-01T11:11:21.000Z","size":106,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-29T22:39:05.311Z","etag":null,"topics":["canvas","chart","donut-chart","javascript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/donut-chart-js","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Seogeurim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-29T02:00:41.000Z","updated_at":"2022-09-27T12:01:13.000Z","dependencies_parsed_at":"2022-09-10T03:53:34.518Z","dependency_job_id":null,"html_url":"https://github.com/Seogeurim/donut-chart-js","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seogeurim%2Fdonut-chart-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seogeurim%2Fdonut-chart-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seogeurim%2Fdonut-chart-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seogeurim%2Fdonut-chart-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Seogeurim","download_url":"https://codeload.github.com/Seogeurim/donut-chart-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245589176,"owners_count":20640239,"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":["canvas","chart","donut-chart","javascript"],"created_at":"2024-10-29T21:16:09.520Z","updated_at":"2025-03-26T04:30:57.563Z","avatar_url":"https://github.com/Seogeurim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Donut Chart JS\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/22045163/127536703-c31300ef-23e4-4831-8191-1600c40012db.gif\" alt=\"preview\" /\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eDonut-Chart-JS\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"./LICENSE\"\u003e\n    \u003cimg alt=\"NPM\" src=\"https://img.shields.io/npm/l/donut-chart-js\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/Seogeurim/donut-chart-js/releases\"\u003e\n    \u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/donut-chart-js\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eSimple Donut Chart using JavaScript and HTML5 Canvas.\u003c/p\u003e\n\n## Installation\n\n```shell\nyarn add donut-chart-js\n```\n\nor\n\n```shell\nnpm install donut-chart-js\n```\n\nthen\n\n```js\nimport DonutChart from 'donut-chart-js';\n```\n\n## Usage\n\nCreate canvas element on your HTML\n\n```html\n\u003ccanvas id=\"myChart\" width=\"500px\" height=\"500px\"\u003e\u003c/canvas\u003e\n```\n\nthen write script\n\n```js\nnew DonutChart(document.getElementById('myChart'), {\n  data: [\n    { label: 'red', value: 120, color: '#F15F5F' },\n    { label: 'green', value: 250, color: '#BCE55C' },\n    { label: 'blue', value: 180, color: '#B2CCFF' },\n    { label: 'yellow', value: 70, color: '#FFE08C' },\n  ],\n  holeSize: 0.6,\n  animationSpeed: 0.5,\n});\n```\n\n## options\n\n|               option | type     | default | description                                               |\n| -------------------: | :------- | :------ | :-------------------------------------------------------- |\n|     **`data.label`** | `string` | `0`     | The name or label of the donut.                           |\n|     **`data.value`** | `number` | `100`   | The value of the donut.                                   |\n|     **`data.color`** | `string` | `50`    | The color of the donut.                                   |\n|       **`holeSize`** | `number` | `0`     | (Optional) The hole size of the donut. Use `0-1` value.   |\n| **`animationSpeed`** | `number` | `1`     | (Optional) The speed of chart animation. Use `0-1` value. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseogeurim%2Fdonut-chart-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseogeurim%2Fdonut-chart-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseogeurim%2Fdonut-chart-js/lists"}