0
点赞
收藏
分享

微信扫一扫

Highcharts 甘特图任务之间的依赖关系​

需求

Highcharts 甘特图使用数据点的依赖属性来确定依赖任务之间的关系,并在它们之间绘制箭头。注意,在存在多个依赖项的情况下,依赖项属性也采用Array<String|Object>

分析与解决

定义依赖项的代码示例

Highcharts.ganttChart('container', {
 title: {
 text: 'Simple Gantt Chart'
 },

 series: [{
 name: 'Project 1',
 data: [{
 id: 's',
 name: 'Start prototype',
 start: Date.UTC(2014, 10, 18),
 end: Date.UTC(2014, 10, 20)
 }, {
 id: 'b',
 name: 'Develop',
 start: Date.UTC(2014, 10, 20),
 end: Date.UTC(2014, 10, 25),
 dependency: 's'
 }, {
 id: 'a',
 name: 'Run acceptance tests',
 start: Date.UTC(2014, 10, 23),
 end: Date.UTC(2014, 10, 26)
 }, {
 name: 'Prototype finished',
 start: Date.UTC(2014, 10, 27),
 end: Date.UTC(2014, 10, 29),
 dependency: ['a', 'b'],
 milestone: true
 }]
 }]
});

效果图:

Highcharts 甘特图任务之间的依赖关系​_甘特图


希望这些信息对大家有所帮助!如果您有任何其他问题,请随时提问。

举报

相关推荐

0 条评论