chartjs-plugin-dragdata icon indicating copy to clipboard operation
chartjs-plugin-dragdata copied to clipboard

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

Open ylkhayat opened this issue 2 years ago • 0 comments

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 💣

  • Remove the chart.js which drastically reduces the package size

Before

image

After

image
  • Subscription only happens if you register the plugin manually which is exported from the package right now
  • This makes this update flexible and dynamic to whichever chart.js release
  • Prettified the file according to the standard prettier config

ylkhayat avatar Dec 15 '23 14:12 ylkhayat