JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Minimum 4 Task for Gantt ?
Tagged: angular gantt chart, chart, custom element, gantt, react gantt chart, smart elements, smart framework, smart gantt chart, web component, web components
- This topic has 3 replies, 2 voices, and was last updated 4 years ago by
Hristofor.
-
AuthorPosts
-
August 27, 2020 at 5:14 am #101019
admin
KeymasterI have been exploring Gantt Demo and tried using code from here https://www.htmlelements.com/angular/demos/gantt/resource-timeline-mode-diagram/ Which worked initially. But if i remove and have only 2-3 tasks then gantt just does not load. i guess it requires minimum of 4 tasks in order to properly show ?
August 27, 2020 at 10:01 am #101021Hristofor
MemberHi GLMSDev,
There is no minimal task requirement for the Smart.GanttChart to load data. Perhaps there’s an issue with the dataSource that is loaded. Can you share a code sample with the data that you are loading or a demo from codepen or other ?
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.comAugust 27, 2020 at 11:51 am #101022admin
KeymasterI have used code from here, i have not changed anything https://www.htmlelements.com/angular/demos/gantt/resource-timeline-mode-diagram
Just use below JSON as datasource.
<div>
<div>dataSource: Array<object> = [</div>
<div>{</div>
<div>label:’Development’,</div>
<div>synchronized:true,</div>
<div>expanded:true,</div>
<div>disableResources:true,</div>
<div>type:”project”/* Project */,</div>
<div>tasks: [</div>
<div>{</div>
<div>label:’User Interface Design’,</div>
<div>dateStart:’2020-02-01′,</div>
<div>dateEnd:’2020-02-10′,</div>
<div>progress:0,</div>
<div>type:”task”/* Task */,</div>
<div>resources: [{</div>
<div>id:’megan’,</div>
<div>label:’Megan’,</div>
<div>},</div>
<div>{</div>
<div>id:’parth’,</div>
<div>label:’parth’,</div>
<div>}]</div>
<div>},</div>
<div>{</div>
<div>label:’Controllers & Event’,</div>
<div>dateStart:’2020-02-10′,</div>
<div>dateEnd:’2020-02-20′,</div>
<div>progress:0,</div>
<div>type:”task”/* Task */,</div>
<div>resources:’megan'</div>
<div>}</div>
<div>]</div>
<div>}</div>
<div>];</div>
</div>August 28, 2020 at 6:59 am #101024Hristofor
MemberHi GLMSDev,
there’s a syntax error in the dateStart/dateEnd declaration of the individual tasks:dateStart:'2020-02-01′, dateEnd:'2020-02-10′, ... dateStart:'2020-02-10′, dateEnd:'2020-02-20′,
The closing apostrophe is not the same as the opening. This results in invalid date string declarations. That is why you don’t see any tasks loaded.
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.com -
AuthorPosts
- You must be logged in to reply to this topic.