artus9033 / chartjs-plugin-dragdata

Draggable data points plugin for Chart.js
MIT License
257 stars 55 forks source link

Omit `chart.js` from the package & Expose the plugin for registration #129

Closed ylkhayat closed 3 months ago

ylkhayat commented 7 months ago

Motivation 🔬

Trying to use this package with Yarn PnP setup failed due to different Chart object reference which gets the subscription of the plugin.

Changes & Concerns 💣

Before

image

After

image
artus9033 commented 3 months ago

Thanks @ylkhayat for noticing this, there's no discussion that according to the art, chart.js should be a peerDependency. Since I've only recently started maintaining the project and this PR is a bit old, I'll just create a new PR for this, especially as this one also introduces some formatting to other files and also cuts out the dep to chart.js entirely, while we still want to have it as a peer dep, since this is a plugin to Chart.js, thus it's the end user's thing to have it installed alongside chart.js and at the same time we don't want to have the plugin bundle include chart.js. We will be tracking this in #134 and will release this in v2.3.0.

artus9033 commented 3 months ago

Merged #134 to master, this can now be closed as well.