max-chem-eng
Posts: 3
Joined: Thu Jun 17, 2021 10:57 am

Drag and Drop returns wrong newPoint data

Hi Highcharts team
I'm having an issue with drag and drop with a Gantt chart.
I have a fetch request as a drop event and the

Code: Select all

e.newPoint.start
is used as a param.
The problem I see is that the returned value of

Code: Select all

e.newPoint.start
is not accurate.
Please see the

Code: Select all

console.log(newStart)
does not always return the value that is actually showing in the chart in:
https://jsfiddle.net/max_chem_eng/f5xp43zk/30/
Thank you for your support on this!
Max
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Drag and Drop returns wrong newPoint data

Hi max-chem-eng,

Thanks for contacting us with your question.

It looks like points are being updated after drop event. Because of that some properties might be outdated. Could you double check e.newPoint.start property? It seems to work correctly for me:
https://jsfiddle.net/BlackLabel/5h0ngjxy/

Regards!
Mateusz Bernacik
Highcharts Developer
max-chem-eng
Posts: 3
Joined: Thu Jun 17, 2021 10:57 am

Re: Drag and Drop returns wrong newPoint data

Fixed!
I was taking incorrect properties of

Code: Select all

e.newPoints
Thanks!
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Drag and Drop returns wrong newPoint data

You're welcome! In case of any further questions, feel free to contact us again.
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Gantt”