翻譯|使用教程|編輯:秦林|2022-10-08 14:01:09.900|閱讀 168 次
概述:這篇文章給大家講解dhtmlxGantt可以加載或支持哪些數據格式(上篇)。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
這篇文章給大家講解 dhtmlxGantt可以加載或支持哪些數據格式。
dhtmlxGantt可以加載以下格式的數據:
{ "tasks":[ {"id":"1", "text":"Project #2", "start_date":"01-04-2020", "duration":18, "progress":0.4, "open": true}, {"id":"2", "text":"Task #1", "start_date":"02-04-2020", "duration":8, "progress":0.6, "parent":"1"}, {"id":"3", "text":"Task #2", "start_date":"11-04-2020", "duration":8, "progress":0.6, "parent":"1"} ], "links":[ {"id":"1", "source":"1", "target":"2", "type":"1"}, {"id":"2", "source":"2", "target":"3", "type":"0"}, {"id":"3", "source":"3", "target":"4", "type":"0"}, {"id":"4", "source":"2", "target":"5", "type":"2"} ] }
<data> <task id='1' parent='' start_date='01-04-2020' duration='18' open='true' progress='0.4' end_date='19-04-2020'> <![CDATA[Project #2]]> </task> <task id='2' parent='1' start_date='02-04-2020' duration='8' progress='0.6' end_date='10-04-2020'> <![CDATA[Task #1]]> </task> <task id='3' parent='1' start_date='11-04-2020' duration='8' progress='0.6' end_date='19-04-2020'> <![CDATA[Task #2]]> </task> <coll_options for='links'> <item id='1' source='1' target='2' type='1' /> <item id='2' source='2' target='3' type='0' /> <item id='3' source='3' target='4' type='0' /> <item id='4' source='2' target='5' type='2' /> </coll_options> </data>
讓我們考慮具有2個自定義屬性的上述示例:
JSON
{ "tasks":[ {"id":"1", "text":"Project #2", "start_date":"01-04-2020", "duration":18, "progress":0.4, "open": true, "holder":"Mike", "priority":"High"}, {"id":"2", "text":"Task #1", "start_date":"02-04-2020", "duration":8, "progress":0.6, "parent":1, "holder":"John", "priority":"Medium"}, {"id":"3", "text":"Task #2", "start_date":"11-04-2020", "duration":8, "progress":0.6, "parent":1, "holder":"Alex", "priority":"Low"} ], "links":[ {"id":"1", "source":"1", "target":"2", "type":"1"}, {"id":"2", "source":"2", "target":"3", "type":"0"}, {"id":"3", "source":"3", "target":"4", "type":"0"}, {"id":"4", "source":"2", "target":"5", "type":"2"} ] }
XML (dhtmlxGantt 2.0+)
<data> <task id='1' parent='' start_date='01-04-2020' duration='18' open='true' progress='0.4' end_date='19-04-2020''> <holder><![CDATA[Mike]]></holder> <priority><![CDATA[High]]></priority> <![CDATA[Project #2]]> </task> <task id='2' parent='1' start_date='02-04-2020' duration='8' progress='0.6' end_date='10-04-2020'> <holder><![CDATA[John]]></holder> <priority><![CDATA[Medium]]></priority> <![CDATA[Task #1]]> </task> <task id='3' parent='1' start_date='11-04-2020' duration='8' progress='0.6' end_date='19-04-2020'> <holder><![CDATA[Alex]]></holder> <priority><![CDATA[Low]]></priority> <![CDATA[Task #2]]> </task> <coll_options for='links'> <item id='1' source='1' target='2' type='1' /> <item id='2' source='2' target='3' type='0' /> <item id='3' source='3' target='4' type='0' /> <item id='4' source='2' target='5' type='2' /> </coll_options> </data>
dhtmlxGantt是用于跨瀏覽器和跨平臺應用程序的功能齊全的Gantt圖表,可滿足項目管理控件應用程序的所有需求,是最完善的甘特圖圖表庫。了解更多DhtmlxGantt相關內容和資訊,歡迎在線咨詢或者私信我獲取正版試用版及報價。
甘特圖控件交流群:764148812 歡迎進群交流討論
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn