{"id":18821154,"url":"https://github.com/compwright/chartjs-plugin-draggable","last_synced_at":"2025-04-14T00:26:24.384Z","repository":{"id":57197180,"uuid":"73961429","full_name":"compwright/chartjs-plugin-draggable","owner":"compwright","description":"Draggable element plugin for Chart.js","archived":false,"fork":false,"pushed_at":"2017-06-27T19:44:59.000Z","size":46,"stargazers_count":45,"open_issues_count":13,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T14:47:43.822Z","etag":null,"topics":[],"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/compwright.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-16T21:10:55.000Z","updated_at":"2024-10-03T08:03:39.000Z","dependencies_parsed_at":"2022-09-16T13:11:33.578Z","dependency_job_id":null,"html_url":"https://github.com/compwright/chartjs-plugin-draggable","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fchartjs-plugin-draggable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fchartjs-plugin-draggable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fchartjs-plugin-draggable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fchartjs-plugin-draggable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compwright","download_url":"https://codeload.github.com/compwright/chartjs-plugin-draggable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505957,"owners_count":21115354,"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":[],"created_at":"2024-11-08T00:34:41.308Z","updated_at":"2025-04-14T00:26:24.341Z","avatar_url":"https://github.com/compwright.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chartjs-plugin-draggable.js\n\nA plugin for Chart.js \u003e= 2.4.0\n\nMakes elements such as annotations movable via drag and drop.\n\n## Configuration\n\nTo make an element draggable, simply add the following options to the element's config section.\n\n```javascript\n{\n    ...\n    draggable: true,\n    onDragStart: function(event) {\n\n    },\n    onDrag: function(event) {\n\n    },\n    onDragEnd: function(event) {\n\n    }\n}\n```\n\n## Supported Elements\n\n### Annotations\n\nRequires chartjs-plugin-annotation.js \u003e= 0.3.0.\n\nLine annotations are supported:\n\n```javascript\nvar options = {\n    ...\n    annotation: {\n        annotations: [\n            {\n                type: 'line',\n                mode: 'horizontal',\n                scaleID: 'y-axis-0',\n                value: 25,\n                draggable: true,\n                onDrag: function(event) {\n                    console.log(event.subject.config.value);\n                }\n            }\n        ]\n    }\n};\n```\n\n## To-do Items\n\nThe following features still need to be done:\n\n* Box annotation support\n* Skewed line annotation support\n\n## Installation\n\nTo install via npm:\n\n```\nnpm install chartjs-plugin-draggable --save\n```\n\nOr, download a release archive file from the releases page.\n\n## Contributing\n\nBefore submitting an issue or a pull request to the project, please take a moment to look over the [contributing guidelines](https://github.com/chartjs/chartjs-plugin-annotation.js/blob/master/CONTRIBUTING.md) first.\n\n## License\n\nchartjs-plugin-draggable.js is available under the [MIT license](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwright%2Fchartjs-plugin-draggable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompwright%2Fchartjs-plugin-draggable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwright%2Fchartjs-plugin-draggable/lists"}