[email protected]
Posts: 65
Joined: Fri Aug 26, 2022 9:33 am

Interactive gantt - Get changes after drag

Hello,
I'm implementing Interactive gantt with draggable option.
Someone can help me to understand how I can get the changes after drag or also to have a button to save it's a possibility for me.

My URL: https://kdna-it.outsystemscloud.com/Sam ... arts/Gantt

Thanks in advance
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Interactive gantt - Get changes after drag

Hi [email protected]!
Thanks for contacting us with your question!

There are events for that: drag, dragStart, drop. In this callback functions, you have informations about changes before/after dragging.

Demo: https://jsfiddle.net/gh/get/library/pur ... rag-xrange
API Reference: https://api.highcharts.com/highcharts/p ... vents.drag
https://api.highcharts.com/highcharts/p ... .dragStart
https://api.highcharts.com/highcharts/p ... vents.drop

Best regards!
Hubert Kozik
Highcharts Developer
[email protected]
Posts: 65
Joined: Fri Aug 26, 2022 9:33 am

Re: Interactive gantt - Get changes after drag

hubert.k wrote: Fri Aug 26, 2022 10:52 am Hi [email protected]!
Thanks for contacting us with your question!

There are events for that: drag, dragStart, drop. In this callback functions, you have informations about changes before/after dragging.

Demo: https://jsfiddle.net/gh/get/library/pur ... rag-xrange
API Reference: https://api.highcharts.com/highcharts/p ... vents.drag
https://api.highcharts.com/highcharts/p ... .dragStart
https://api.highcharts.com/highcharts/p ... vents.drop

Best regards!
Thanks a lot.
It seems those callbacks doens't returns the new range dates, right?
Exists some Callback just to return the identifier/name on click?

Best Regards
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Interactive gantt - Get changes after drag

[email protected],
You can get the new date range from this object, e.g. in the drop event. To get the name of clicked point you have a point.events.click function. You can see console.log's in the demo below and also read some documentation of events :)

Demo: https://jsfiddle.net/BlackLabel/2k95ypfd/
API Reference: https://api.highcharts.com/gantt/plotOp ... ents.click
https://api.highcharts.com/gantt/plotOp ... vents.drop

Regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Gantt”