{"id":13593339,"url":"https://github.com/artus9033/chartjs-plugin-dragdata","last_synced_at":"2025-04-12T14:55:49.838Z","repository":{"id":37752445,"uuid":"115925271","full_name":"artus9033/chartjs-plugin-dragdata","owner":"artus9033","description":"Draggable data points plugin for Chart.js","archived":false,"fork":false,"pushed_at":"2024-04-15T14:17:19.000Z","size":43501,"stargazers_count":247,"open_issues_count":27,"forks_count":55,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-28T03:17:09.349Z","etag":null,"topics":["chartjs","data","drag","plugin"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/artus9033.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-01T14:45:52.000Z","updated_at":"2024-08-17T19:20:19.351Z","dependencies_parsed_at":"2024-01-14T04:35:21.252Z","dependency_job_id":"fb73f3b9-c3ab-4994-80d1-4392a5d5c997","html_url":"https://github.com/artus9033/chartjs-plugin-dragdata","commit_stats":{"total_commits":160,"total_committers":15,"mean_commits":"10.666666666666666","dds":0.28125,"last_synced_commit":"8cb0506d38d7022b911f295a06cd86dd07d000af"},"previous_names":["artus9033/chartjs-plugin-dragdata","chrispahm/chartjs-plugin-dragdata"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artus9033%2Fchartjs-plugin-dragdata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artus9033%2Fchartjs-plugin-dragdata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artus9033%2Fchartjs-plugin-dragdata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artus9033%2Fchartjs-plugin-dragdata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artus9033","download_url":"https://codeload.github.com/artus9033/chartjs-plugin-dragdata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586244,"owners_count":21128995,"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":["chartjs","data","drag","plugin"],"created_at":"2024-08-01T16:01:19.381Z","updated_at":"2025-04-12T14:55:49.809Z","avatar_url":"https://github.com/artus9033.png","language":"TypeScript","readme":"# chartjs-plugin-dragdata.js\n\n![NPM Downloads](https://img.shields.io/npm/dm/chartjs-plugin-dragdata)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/artus9033/chartjs-plugin-dragdata/ci.yml)](https://github.com/artus9033/chartjs-plugin-dragdata/actions/workflows/ci.yml)\n[![release](https://img.shields.io/github/v/release/artus9033/chartjs-plugin-dragdata?include_prereleases)](https://github.com/artus9033/chartjs-plugin-dragdata/releases)\n[![npm (latest)](https://img.shields.io/npm/v/chartjs-plugin-dragdata/latest)](https://www.npmjs.com/package/chartjs-plugin-dragdata/v/latest)\n![npm bundle size](https://img.shields.io/bundlephobia/minzip/chartjs-plugin-dragdata)\n![npm bundle size](https://img.shields.io/bundlephobia/min/chartjs-plugin-dragdata)\n[![codecov](https://codecov.io/gh/artus9033/chartjs-plugin-dragdata/graph/badge.svg?token=TDRWG9LKG4)](https://codecov.io/gh/artus9033/chartjs-plugin-dragdata)\n\u003ca href=\"https://github.com/chartjs/awesome\"\u003e\u003cimg src=\"https://awesome.re/badge-flat2.svg\" alt=\"Awesome\"\u003e\u003c/a\u003e\n\nA plugin for Chart.js that makes data points draggable. Supports touch events \u0026 arbitrary Chart.js [interaction modes](https://www.chartjs.org/docs/latest/samples/tooltip/interactions.html).\n\n**Compatible with Chart.js v4, v3 \u0026 v2.4+ 🎉**\n\n![Drag Data Animation](https://user-images.githubusercontent.com/20703207/77322131-8a47f800-6d13-11ea-9ca8-b9fc7f820e85.gif)\n\n### Table of contents\n\n- [chartjs-plugin-dragdata.js](#chartjs-plugin-dragdatajs)\n    - [Table of contents](#table-of-contents)\n    - [Chart.js version compatibility](#chartjs-version-compatibility)\n    - [Online demos](#online-demos)\n  - [Installation](#installation)\n    - [npm](#npm)\n    - [yarn](#yarn)\n    - [CDN](#cdn)\n  - [Getting started](#getting-started)\n    - [Configuration](#configuration)\n      - [Per-chart configuration](#per-chart-configuration)\n      - [Per-scale configuration](#per-scale-configuration)\n      - [Per-dataset configuration](#per-dataset-configuration)\n      - [Per-data-point configuration](#per-data-point-configuration)\n    - [Example configuration](#example-configuration)\n    - [Applying a 'magnet'](#applying-a-magnet)\n  - [React integration example](#react-integration-example)\n  - [Touch devices](#touch-devices)\n  - [Gotchas](#gotchas)\n  - [Contributing](#contributing)\n    - [Additional scripts](#additional-scripts)\n  - [License](#license)\n\n---\n\n### Chart.js version compatibility\n\n| Chart.js version | chartjs-plugin-dragdata version |                                    git branch                                     |\n| :--------------: | :-----------------------------: | :-------------------------------------------------------------------------------: |\n|       4.x        |               2.x               | [master branch](https://github.com/artus9033/chartjs-plugin-dragdata/tree/master) |\n|       3.x        |               2.x               |     [v3 branch](https://github.com/artus9033/chartjs-plugin-dragdata/tree/v3)     |\n|  2.4.x ~ 2.9.4   |               1.x               |     [v2 branch](https://github.com/artus9033/chartjs-plugin-dragdata/tree/v2)     |\n\n### Online demos\n\n| Chart Type                                                                                                                                                                                     | Demo                                                                                            | Source                                                             |\n| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- | :----------------------------------------------------------------- |\n| Bar - simple bar                                                                                                                                                                               | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/bar.html)                            | [source](pages/dist-demos/bar.html#L36)                            |\n| Horizontal Bar - simple horizontal Bar                                                                                                                                                         | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/bar-horizontal.html)                 | [source](pages/dist-demos/bar-horizontal.html#L36)                 |\n| Floating bar - simple floating bars                                                                                                                                                            | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/bar-floating.html)                   | [source](pages/dist-demos/bar-floating.html#L36)                   |\n| Floating bar - simple floating bars, horizontal                                                                                                                                                | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/bar-floating-horizontal.html)        | [source](pages/dist-demos/bar-floating-horizontal.html#L38)        |\n| Stacked Bar - simple stacked bar                                                                                                                                                               | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/bar-stacked.html)                    | [source](pages/dist-demos/bar-stacked.html#L36)                    |\n| Stacked Horizontal Bar - simple stacked horizontal bar                                                                                                                                         | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/bar-stacked-horizontal.html)         | [source](pages/dist-demos/bar-stacked-horizontal.html#L38)         |\n| Stacked Bar - GANTT chart                                                                                                                                                                      | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/gantt.html)                          | [source](pages/dist-demos/gantt.html#L36)                          |\n| Bubble - simple bubble                                                                                                                                                                         | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/bubble.html)                         | [source](pages/dist-demos/bubble.html#L36)                         |\n| Bubble - draggable x-axis                                                                                                                                                                      | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/bubble-x-only.html)                  | [source](pages/dist-demos/bubble-x-only.html#L36)                  |\n| Line - simple, single y-axis                                                                                                                                                                   | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/line-linear.html)                    | [source](pages/dist-demos/line-linear.html#L36)                    |\n| Line - dual y-axis                                                                                                                                                                             | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/line-dual-y-axis.html)               | [source](pages/dist-demos/line-dual-y-axis.html#L36)               |\n| Line - single y-axis, categorical x-axis                                                                                                                                                       | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/line-categorical.html)               | [source](pages/dist-demos/line-categorical.html#L36)               |\n| Line - single y-axis, [custom (max value)](pages/dist-demos/line-linear-custom-interaction.html#L39) [interaction mode](https://www.chartjs.org/docs/latest/samples/tooltip/interactions.html) | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/line-linear-custom-interaction.html) | [source](pages/dist-demos/line-linear-custom-interaction.html#L63) |\n| Line - drag multiple points                                                                                                                                                                    | [demo](https://jsfiddle.net/45nurh9L/3/)                                                        | [source](https://jsfiddle.net/45nurh9L/3/)                         |\n| Line - react fiddle                                                                                                                                                                            | [demo](https://jsfiddle.net/16kvxd4u/3/)                                                        | [source](https://jsfiddle.net/16kvxd4u/3/)                         |\n| Line - drag x-, and y-axis (scatter chart)                                                                                                                                                     | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/scatter.html)                        | [source](pages/dist-demos/scatter.html#L36)                        |\n| Line - drag dates (x and y axis)                                                                                                                                                               | [demo](https://jsfiddle.net/f72kz348/9/)                                                        | [source](https://jsfiddle.net/f72kz348/9/)                         |\n| Line - zoom, pan, and drag data points (combination with [chartjs-plugin-zoom](https://github.com/chartjs/chartjs-plugin-zoom))                                                                | [demo](https://jsfiddle.net/s6xn3q9f/1/)                                                        | [source](https://jsfiddle.net/s6xn3q9f/1/)                         |\n| Mixed - bar, bubble, and line chart                                                                                                                                                            | [demo](https://jsfiddle.net/rqbcs6ep/3/)                                                        | [source](https://jsfiddle.net/rqbcs6ep/3/)                         |\n| Radar - simple radar                                                                                                                                                                           | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/radar.html)                          | [source](pages/dist-demos/radar.html#L36)                          |\n| Polar - simple polar area chart                                                                                                                                                                | [demo](https://artus9033.github.io/chartjs-plugin-dragdata/polar.html)                          | [source](pages/dist-demos/polar.html#L36)                          |\n\nClick here to learn [how to use this plugin in an Observable notebook](https://observablehq.com/@chrispahm/draggable-data-charts).\n\n## Installation\n\n### npm\n\n```bash\nnpm install chartjs-plugin-dragdata\n```\n\n### yarn\n\n```bash\nyarn add chartjs-plugin-dragdata\n```\n\n### CDN\n\nIn browsers, you may simply add the following script tag:\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/chartjs-plugin-dragdata@latest/dist/chartjs-plugin-dragdata.min.js\"\u003e\u003c/script\u003e\n```\n\nOr, download a release archive file from [releases](https://github.com/artus9033/chartjs-plugin-dragdata/releases).\n\n## Getting started\n\nAfter you install the plugin, it should work out-of-the-box since it features automatic global registration, i.e., automatically calls `Chart.register(ChartJSDragDataPlugin)` and is therefore applied to all charts. If you want to disable it in a specific chart, please refer to the [Configuration section below](#configuration).\n\n\u003e [!NOTE]\n\u003e The automatic registration behaviour is **deprecated** and is planned to be removed in the nearest major release (`v3.0.0`). After the change, it will be necessary to perform the registration manually as [described in chart.js documentation](https://www.chartjs.org/docs/latest/developers/plugins.html#using-plugins).\n\n### Configuration\n\nThe plugin can be configured in multiple ways:\n\n- [per-chart](#per-chart-configuration) (inside `plugins` section in chart configuration)\n- [per-scale](#per-scale-configuration) (inside a scale's configuration)\n- [per-dataset](#per-dataset-configuration) (inside a dataset's configuration)\n- [per-data-point](#per-data-point-configuration) (inside a data point's object, for object data points only)\n\nApplying a configuration to disable dragging at any of the above levels will cause the successive (lower on the list) levels to be overridden. For instance, disabling dragging for a dataset will cause all data points inside it to be disabled. This is to achieve compatibility with the previous versions of the library.\n\n\u003e [!NOTE]\n\u003e The above is about to change in the nearest major release (`v3.0.0`). After the change, the configuration of the lower levels will override the higher levels.\n\n#### Per-chart configuration\n\nPer-chart configuration can be applied to a single chart by adding to `chart.options.plugins` a property `dragData` of type `PluginConfiguration | boolean`.\n\nBy default, the plugin is enabled, which is equivalent to setting the property to `true`. Note that the default behaviour, however, is allowing for dragging only on the y-axis, and not on the x-axis. To enable dragging on the x-axis, you must apply other configuration options.\nTo disable the plugin for a chart, the property must be set to `false` (which applies just to the given chart).\n\n```javascript\nnew Chart(ctx, {\n  options: {\n    plugins:{\n      dragData: ... // PluginConfiguration goes here\n    }\n  }\n})\n```\n\nThe `PluginConfiguration` object can contain the following properties:\n\n| Property      | Type                                                                                                                           | Default     | Description                                                                                                                                                                                                                  |\n| ------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `dragX`       | `boolean`                                                                                                                      | `false`     | Enables dragging along the x-axis. This solely works for continuous, numerical x-axis scales (no categories or dates)!                                                                                                       |\n| `dragY`       | `boolean`                                                                                                                      | `true`      | Enables dragging along the y-axis.                                                                                                                                                                                           |\n| `onDragStart` | `DragEventCallback = (event: MouseEvent \\| TouchEvent, datasetIndex: number, index: number, value: number) =\u003e boolean \\| void` | `undefined` | Callback function that is called when dragging starts. If the callback returns `false`, dragging is stopped for the given data point. If the callback returns `false`, the drag is prevented and the new value is discarded. |\n| `onDrag`      | `DragEventCallback = (event: MouseEvent \\| TouchEvent, datasetIndex: number, index: number, value: number) =\u003e boolean \\| void` | `undefined` | Callback function that is called when dragging. If the callback returns `false`, the drag is prevented and the previous value of the data point is still effective while the new one is discarded.                           |\n| `onDragEnd`   | `DragEventCallback = (event: MouseEvent \\| TouchEvent, datasetIndex: number, index: number, value: number) =\u003e void`            | `undefined` | Callback function that is called when dragging ends. If the callback returns `false`, the drag is prevented and the previous value of the data point is still effective while the new one is discarded.                      |\n| `magnet`      | `{ to: (value: ChartDataItemType) =\u003e ChartDataItemType }`                                                                      | `undefined` | Configuration object for applying a 'magnet' to the dragged data point.                                                                                                                                                      |\n\n#### Per-scale configuration\n\nPer-scale configuration can be applied to a single chart's scale by adding to `chart.options.scales[scaleID]` a property `dragData` of type `boolean`. This property can be set to `true` to enable dragging for the entire scale, or to `false` to disable it.\n\n#### Per-dataset configuration\n\nPer-dataset configuration can be applied to a single chart's dataset by adding to `chart.data.datasets[datasetIndex]` a property `dragData` of type `boolean`. This property can be set to `true` to enable dragging for the entire dataset, or to `false` to disable it.\n\n#### Per-data-point configuration\n\nPer-data-point configuration can be applied to a single data point by adding to `chart.data.datasets[datasetIndex].data[index]` a property `dragData` of type `boolean`. This property can be set to `true` to enable dragging for the entire dataset, or to `false` to disable it.\n\n### Example configuration\n\nThe following Chart.js sample configuration displays most of the available\nconfiguration options of the `dragdata` plugin. For all of the options, see the [Configuration section](#configuration).\n\n```js\nconst draggableChart = new Chart(ctx, {\n\ttype: \"line\",\n\tdata: {\n\t\tlabels: [\"Red\", \"Blue\", \"Yellow\", \"Green\", \"Purple\", \"Orange\"],\n\t\tdatasets: [\n\t\t\t{\n\t\t\t\tlabel: \"# of Votes\",\n\t\t\t\tdata: [12, 19, 3, 5, 2, 3],\n\t\t\t\tfill: true,\n\t\t\t\ttension: 0.4,\n\t\t\t\tborderWidth: 1,\n\t\t\t\tpointHitRadius: 25, // for improved touch support\n\t\t\t\t// dragData: false // prohibit dragging this dataset\n\t\t\t\t// same as returning `false` in the onDragStart callback\n\t\t\t\t// for this datsets index position\n\t\t\t},\n\t\t],\n\t},\n\toptions: {\n\t\tplugins: {\n\t\t\tdragData: {\n\t\t\t\tround: 1, // rounds the values to n decimal places\n\t\t\t\t// in this case 1, e.g 0.1234 =\u003e 0.1)\n\t\t\t\tshowTooltip: true, // show the tooltip while dragging [default = true]\n\t\t\t\t// dragX: true // also enable dragging along the x-axis.\n\t\t\t\t// this solely works for continous, numerical x-axis scales (no categories or dates)!\n\t\t\t\tonDragStart: function (event, datasetIndex, index, value) {\n\t\t\t\t\t// you may use this callback to prohibit dragging certain datapoints\n\t\t\t\t\t// by returning false in this callback\n\t\t\t\t\tif (element.datasetIndex === 0 \u0026\u0026 element.index === 0) {\n\t\t\t\t\t\t// this would prohibit dragging the first datapoint in the first\n\t\t\t\t\t\t//dataset entirely\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tonDrag: function (event, datasetIndex, index, value) {\n\t\t\t\t\t// you may control the range in which datapoints are allowed to be\n\t\t\t\t\t// dragged by returning `false` in this callback\n\t\t\t\t\tif (value \u003c 0) return false; // this only allows positive values\n\t\t\t\t\tif (datasetIndex === 0 \u0026\u0026 index === 0 \u0026\u0026 value \u003e 20) return false;\n\t\t\t\t},\n\t\t\t\tonDragEnd: function (event, datasetIndex, index, value) {\n\t\t\t\t\t// you may use this callback to store the final datapoint value\n\t\t\t\t\t// (after dragging) in a database, or update other UI elements that\n\t\t\t\t\t// dependent on it\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tscales: {\n\t\t\ty: {\n\t\t\t\tdragData: false, // disables datapoint dragging for the entire axis\n\t\t\t},\n\t\t},\n\t},\n});\n```\n\nMinimum and maximum allowed data values can also be specified through the `min` and `max` ticks settings in the scales options. By setting these values accordingly, unexpected (fast) changes to the scales, that may occur when dragging data points towards the outer boundaries of the y-axis, can be prohibited.\n\n```javascript\nconst myChartOptions = {\n  type: 'line', // or radar, bar, horizontalBar, bubble\n  data: {...},\n  options: {\n    plugins: {dragData: true},\n    scales: {\n      y: {\n        max: 25,\n        min: 0\n      }\n    }\n  }\n}\n```\n\n### Applying a 'magnet'\n\nIn some scenarios, one might want to stop dragging at the closest (rounded) value, or even at a fixed value.\nThis may be achieved by specifying a `magnet` callback function\nin the plugins settings:\n\n```javascript\nconst myChartOptions = {\n  type: 'line', // or radar, bar, bubble\n  data: {...},\n  options: {\n    plugins: {\n      dragData: {\n        magnet: {\n          to: Math.round // to: (value) =\u003e value + 5\n        }\n      }\n    }\n  }\n}\n```\n\n## React integration example\n\nYou can find a full React example featuring `react-chartjs-2` in the repository: [chartjs-plugin-dragdata-react-example](https://github.com/artus9033/chartjs-plugin-dragdata-react-example).\n\n## Touch devices\n\nIn order to support touch events, the [`pointHitRadius`](https://www.chartjs.org/demos/dist/latest/charts/line.html#point-styling) option should be set to a value greater than `25`. You can find working example configurations in the `pages/dist-demos/*.html` files. Also note, that mobile devices (and thus touch events) can be simulated with the [device mode in the Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools/device-mode/).\n\n## Gotchas\n\nWhen working with a module bundler (e.g. Rollup/Webpack) and a framework (e.g. Vue.js/React/Angular), you still need to import the plugin library after installing.\nHere's a small example for a Vue.js component\n\n```js\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003ccanvas id=\"chart\"\u003e\u003c/canvas\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n  import { Chart, registerables } from 'chart.js'\n  // Load the options file externally for better readability of the component.\n  // In the chartOptions object, make sure to add \"dragData: true\" etc.\n  import chartOptions from '~/assets/js/labour.js'\n  import 'chartjs-plugin-dragdata'\n\n  export default {\n    data() {\n      return {\n        chartOptions\n      }\n    },\n    mounted() {\n      Chart.register(...registerables)\n      this.createChart('chart', this.chartOptions)\n    },\n    methods: {\n      createChart(chartId, chartData) {\n        const ctx = document.getElementById(chartId)\n        const myChart = new Chart(ctx, {\n          type: chartData.type,\n          data: chartData.data,\n          options: chartData.options,\n        })\n      }\n    }\n  }\n\u003c/script\u003e\n```\n\n## Contributing\n\nPlease feel free to submit an issue or a pull request!\nIf you make changes to the source files, don't forget to:\n\n- `npm run build` to build the library (outputs will be written to `dist/`) or `npm run build:watch` to run the rollup packager in watch mode and build the library each time the source files change\n- `npm run build:pages` or `npm run build:pages:watch` to build the demo \u0026 E2E test pages files; outputs will be written to `pages/dist-demos/` for demos, and to `/pages/dist-e2e` for E2E tests (the latter ones containing `eval`-using code for injecting data from Playwright)\n- run unit, integration \u0026 E2E tests with `npm run test` (or separately with `npm run test:unit`, `npm run test:integration`, `npm run test:e2e`)\n- if your changes do change the chart's appearance after performing some interaction, update snapshots by running the command `npm run test:e2e:updateSnapshots`\n- manually test your changes to ensure that they do work and don't break existing features\n- when committing, please remember that the commit message must match the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) convention; lefthook will check that for you automatically\n- create a PR\n\n### Additional scripts\n\nThe build command comes in four variants:\n\n- `build` which builds bundles for all targets:\n  - `chartjs-plugin-dragdata.esm.js`- ESM production, minified (tersed) bundle\n  - `chartjs-plugin-dragdata.js`- UMD production, non-minified bundle\n  - `chartjs-plugin-dragdata.min.js` - UMD production, minified (tersed) bundle\n  - `chartjs-plugin-dragdata-test.js` - bundle for Jest unit tests with coverage instrumentation code injected by `rollup-istanbul-plugin`\n  - `chartjs-plugin-dragdata-test-browser.js` - bundle for E2E test with additional test-only exports used for automatic tests, allows for injection of urlencoded configuration for Playwright and with coverage instrumentation code injected by `rollup-istanbul-plugin`\n- `build:no-coverage` which works like `build`, but does not include the `rollup-istanbul-plugin`, which may sometimes be helpful when you alter the code and encounter an error when running tests, making the result bundle not contain rubbish code injected by Istanbul\n- `build:watch` which works as `build`, but watches source files for changes and triggers a rebuild whenever they change\n- `build:watch:no-coverage` which works like a mix of `build:watch` and `build:no-coverage`\n\nScripts for linting are also provided:\n\n- `lint` which runs ESLint on the project\n- `lint:fix` which runs ESLint on the project in fix mode\n\n## License\n\nchartjs-plugin-dragdata.js is available under the [MIT license](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":["TypeScript","Plugins"],"sub_categories":["Interactions"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartus9033%2Fchartjs-plugin-dragdata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartus9033%2Fchartjs-plugin-dragdata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartus9033%2Fchartjs-plugin-dragdata/lists"}