Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dragging not working when usind parsing-option #124

Open
StefanTurbine opened this issue Jun 12, 2023 · 0 comments
Open

dragging not working when usind parsing-option #124

StefanTurbine opened this issue Jun 12, 2023 · 0 comments

Comments

@StefanTurbine
Copy link

StefanTurbine commented Jun 12, 2023

Summary
When using the parsing option to use other fields than 'y' inside the dataset the dragging is disabled.
The events OnDragStart or OnDragEnd are occuring but the configured value is not changed.

Used Versions
chart.js: 3.9.1
chartjs-plugin-dragdata: 2.2.5

Example Config
{ "type": "line", "data": { "datasets": [ { "label": "WIND", "data": [ { "uuid": "698b6560-7c25-465c-a707-8352f9e8caba", "x": "2020", "value": 46420430000, "percentage": 1 }, { "uuid": "708a69ef-eb98-4355-81a7-c3565cc33751", "x": "2025", "value": 50640580000, "percentage": 1.0909114801392403 }, { "uuid": "76ffaae8-255c-446f-8ff1-b3b258ec92a4", "x": "2030", "value": 54860980000, "percentage": 1.1818283458382441 }, { "uuid": "a8f1a128-f0e1-4c02-a216-b5b8e4ca82da", "x": "2035", "value": 66931110000, "percentage": 1.4418459716982372 } ], "backgroundColor": [ "rgba(255, 99, 132, 0.2)", "rgba(54, 162, 235, 0.2)", "rgba(255, 206, 86, 0.2)", "rgba(75, 192, 192, 0.2)", "rgba(153, 102, 255, 0.2)", "rgba(255, 159, 64, 0.2)" ], "borderColor": [ "rgba(255, 99, 132, 1)", "rgba(54, 162, 235, 1)", "rgba(255, 206, 86, 1)", "rgba(75, 192, 192, 1)", "rgba(153, 102, 255, 1)", "rgba(255, 159, 64, 1)" ], "borderWidth": 1 } ] }, "options": { "parsing": { "yAxisKey": "percentage" }, "responsive": true, "scales": { "y": { "dragData": true } }, "plugins": { "dragData": { "round": 1 }, "legend": { "position": "top" } } } }

Expected behavior
It should be possible to drag the points :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant