JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Gantt › Gantt Chart connections
Tagged: angular gantt chart, blazor gantt chart, chart, custom element, gantt, gantt chart, react gantt chart, smart elements, smart framework, smart gantt chart, vue gantt chart, web component, web components
- This topic has 1 reply, 2 voices, and was last updated 3 years, 9 months ago by Hristofor.
-
AuthorPosts
-
February 12, 2021 at 9:55 am #101489AnonymousInactive
Hi,
I have a question on the Gantt connections. I set the connection on the task element, with the id of other task like target and type=1 :
es:
{“id”:”17″,”type”:”task”,”synchronized”:false,”label”:”test Task 1″,”expanded”:false,”progress”:85,”connections”:[{“target”:”59″,”type”:1,”lag”:0},{“target”:”62″,”type”:1,”lag”:0}],”dateStart”:”2020-04-01T22:00:00.000Z”,”dateEnd”:”2020-04-03T15:00:00.000Z”,”duration”:15,”resources”:[“00050″,”00012″,”00003″,”00185″],”disableResources”:false,”description”:”test”…{“id”:”59″,”type”:”task”,”synchronized”:false,”label”:”test relation”,”expanded”:false,”progress”:0,”connections”:[],”dateStart”:”2020-06-08T22:00:00.000Z”,”dateEnd”:”2020-06-10T11:00:00.000Z”,”duration”:12,”resources”:[],”disableResources”:false,”description”:”relation task”…
The connections works correctly, but if I set autoschedule=true for the Gantt chart, this is not work because the target it’s not the id of the task but the position in the array (es: https://www.htmlelements.com/demos/gantt/auto-schedule/ ) this is correct? the connection targets must be the positions in the datasource array and not the id of the task? And why when use the events connectionEnd the startIndex and endIndex is always -1?
Thank you in advance.
WalterFebruary 12, 2021 at 1:16 pm #101491HristoforMemberHi Walter,
Thank you for the feedback. TheautoSchedule
feature in the current version works only if the connection.target points to the index of a task not it’s id. This will be updated in order to support task ids as well in our next release. TheconnectionEnd
event should return the indexes of the start and end tasks in theevent.detail
but it doesn’t which will also be fixed in our next release. As a solution may I suggest using thegetTaskIndex( task: GanttChartTask)
in order to get the index of the target task. The method accepts Smart.GanttChart task object or a direct DOM reference to the HTMLElement corresponding to the task id.
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.com -
AuthorPosts
- You must be logged in to reply to this topic.