artus9033 / chartjs-plugin-dragdata

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

Plugin not working in React Fiddle #71

Closed bhu413 closed 3 years ago

bhu413 commented 3 years ago

Describe the bug Plugin does not seem to work with React.js. Even in the demo fiddle, the points are not draggable.

To Reproduce

https://jsfiddle.net/3v9kexbh/ (copied link directly from "Line - React Fiddle")

Expected behavior Points should be draggable on line graph

chrispahm commented 3 years ago

Hey @bhu413!

Sorry for the inconvenience, the Fiddle was pointing to the "latest" version of the plugin (which is incompatible with Chart.js v2), but is still using Chart.js v2.

Here's the "corrected" and working link to a Fiddle using Chart.js v 2.x and version 1.x of this plugin: https://jsfiddle.net/16kvxd4u/3/

I'll update the readme accordingly!

Other than this, there is no apparent reason why the plugin shouldn't work with React, Chart.js v3, and the latest version of this plugin as well.

I'll close this for now, let me know if you run into issues and I will re-open.