artus9033 / chartjs-plugin-dragdata

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

Too many arguments passed in line 30 of index.js #27

Closed gspeach closed 5 years ago

gspeach commented 5 years ago

Hello,

I found an issue in your index.js file.

If you look at getElement function you can see this line is passing in 6 arguments, but the function only requires 5.

let newPos = calcPosition(e,chartInstance,datasetIndex,index,x,y)

chrispahm commented 5 years ago

Hey @gspeach, thanks for the code review! I just merged the required change in https://github.com/chrispahm/chartjs-plugin-dragdata/pull/28. Beware that I also had to rename the package name (chartjs-plugin-dragdata instead of dragData) to adhere to the official chartjs-plugin-id conventions. The API didn't change, though (still dragData: true). Just make sure to keep that in mind when upgrading to v1.0 and importing this plugin.

Thanks again, Christoph

gspeach commented 5 years ago

Thanks!