{"id":26935871,"url":"https://github.com/xingoxu/canvas-contribution","last_synced_at":"2026-03-06T02:47:55.166Z","repository":{"id":57193700,"uuid":"83970232","full_name":"xingoxu/canvas-contribution","owner":"xingoxu","description":"generate github contribution or other activities in canvas","archived":false,"fork":false,"pushed_at":"2017-03-07T09:44:06.000Z","size":9798,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T14:01:44.254Z","etag":null,"topics":["canvas","contribution-graph"],"latest_commit_sha":null,"homepage":null,"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/xingoxu.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":"2017-03-05T13:01:55.000Z","updated_at":"2024-12-18T06:15:22.000Z","dependencies_parsed_at":"2022-09-15T22:20:39.718Z","dependency_job_id":null,"html_url":"https://github.com/xingoxu/canvas-contribution","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingoxu%2Fcanvas-contribution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingoxu%2Fcanvas-contribution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingoxu%2Fcanvas-contribution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingoxu%2Fcanvas-contribution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xingoxu","download_url":"https://codeload.github.com/xingoxu/canvas-contribution/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246811311,"owners_count":20837753,"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","contribution-graph"],"created_at":"2025-04-02T12:19:54.492Z","updated_at":"2026-03-06T02:47:50.128Z","avatar_url":"https://github.com/xingoxu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Canvas Contribution\n\nGenerate github contribution or other activities in canvas.\n\n## Preview\n\n- Default\n\n![default](preview/default.gif)\n\n- Custom\n\n![custom](preview/custom.gif)\n\n## Usage\n\n```javascript\n//if you use UMD, CanvasContributionTool is a global var\nimport CanvasContributionTool from 'canvas-contribution';\n\nlet canvas = document.getElementById('test');\nCanvasContributionTool(canvas, { //data\n  max: max,\n  data: [\n    {\n      count: 123,\n      date: '2017-03-05', //Start from Sunday\n    },{\n      count: 123,\n      date: '2017-03-06',\n    },\n    //...etc\n    {\n      count: 123,\n      date: '2017-03-05',\n    }\n  ],\n},{ //config\n  padding_top: (44 - 13) * 2, //*2 for Retina Display and the tool will automatically set the width and height\n  padding_left_right: 100 * 2,\n  footer_margin_top: 14 * 2,\n  padding_bottom: (44 - 13 + 2) * 2,\n  color: {\n    0: '#eee', //less\n    1: '#FFAFB7',\n    2: '#FE8A95',\n    3: '#E26470',\n    4: '#BB4956', //more\n  },\n  text: 'activities',\n});\n```\n\n\n## Develop\n\n```bash\nnpm run dev //start live demo\nnpm run build //build UMD\n```\n\n#### License [MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxingoxu%2Fcanvas-contribution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxingoxu%2Fcanvas-contribution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxingoxu%2Fcanvas-contribution/lists"}