首先,确保html页面可以包含flash项目,在html代码页面添加AnyGantt组件:
/swf
AnyGantt.swf
/js
AnyGantt.js
anychart.xml
Anychart.html
我们以如下表格数据为例,进行数据和样式的选择:
Task
Start Time
End Time
Current Progress
Architectural Design
2008/01/01
2008/01/02
50%
Interior Design
2008/02/01
2008/03/01
35%
Construction Phase
2008/02/10
2008/04/18
0%
Decoration Phase
2008/04/01
2008/05/10
0%
Opening Celebration
2008/05/20
0%
其次是转为表格数据为XML传送至AnyGAntt:
然后,完善html文件结构:
AnyChart Sample//
var chart = new AnyGantt('./swf/AnyGantt.swf');
chart.width = 700;
chart.height = 300;
chart.setXMLFile('./anychart.xml');
chart.write();
//]]>
最后通过浏览器,将可以看见web页面展示的甘特图:
甘特图甘特图开发
本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至hey@evget.com