stan_sf
Posts: 3
Joined: Fri Nov 27, 2020 1:29 am

How to implement copy / paste in gantt chart? (or at least multiselect)

Is it possible to build a "select and copy all events on the row" to paste into a different row?
User request: "Ideally like excel, select either several rows for one day (column), or all events on one or a few rows" to simplify repetitive data entry across many series, when creating the schedule

I wanted to start by having a multi-select via "drag & highlight a region with many events". I found an example for scatter charts, but it does not seem to work for gantt charts

How would I build the initial highlighting and multi-select? I don't see any way to do it.
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: How to implement copy / paste in gantt chart? (or at least multiselect)

Hello stan_sf!
Thanks for contacting us with your question!

Sadly, there is no feature copy/paste in Highcharts. If you want you can create a feature request to implement this in Highcharts here: https://github.com/highcharts/highcharts/issues

It is possible to make a multi-select drag-drop feature in Highcharts Gantt. To do this you have to use a groupBy property and select/unselect events on points. In this event just add or remove clicked points to the group. An interesting step is multiselection, because we want to move a group of points, by selecting them with CTRL/CMD key. It can be implemented based on event.accumulate property in select/unselect event. I have prepared a demo for you with this feature, you can check it below.

Demo: https://jsfiddle.net/BlackLabel/f25aecso/
API Reference: https://api.highcharts.com/gantt/plotOp ... op.groupBy
https://api.highcharts.com/gantt/plotOp ... nts.select
https://api.highcharts.com/gantt/plotOp ... s.unselect

If you have any further questions, I am here to help you.
Kind regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Gantt”