mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-25 10:20:06 +02:00
Experimental support for gantt diagrams
This commit is contained in:
@@ -54,7 +54,7 @@ exports.getTasks=function(){
|
||||
tasks[i].startTime = moment(tasks[i].startTime).format('YYYY-MM-DD');
|
||||
tasks[i].endTime = moment(tasks[i].endTime).format('YYYY-MM-DD');
|
||||
}
|
||||
|
||||
|
||||
return tasks;
|
||||
};
|
||||
|
||||
|
@@ -26,7 +26,7 @@ module.exports.draw = function (text, id) {
|
||||
if(typeof w === 'undefined'){
|
||||
w = 800;
|
||||
}
|
||||
|
||||
|
||||
var taskArray = gantt.yy.getTasks();
|
||||
|
||||
// Set height based on number of tasks
|
||||
|
@@ -57,7 +57,7 @@ statement
|
||||
: 'dateFormat' dateFormatInst {yy.setDateFormat($2);$$=$2;}
|
||||
| title {yy.setTitle($1.substr(6));$$=$1.substr(6);}
|
||||
| section {yy.addSection($1.substr(8));$$=$1.substr(8);}
|
||||
| taskTxt taskData
|
||||
| taskTxt taskData {yy.addTask($1,$2);$$='task';}
|
||||
;
|
||||
|
||||
%%
|
@@ -107,6 +107,9 @@ break;
|
||||
case 10:
|
||||
yy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);
|
||||
break;
|
||||
case 11:
|
||||
yy.addTask($$[$0-1],$$[$0]);this.$='task';
|
||||
break;
|
||||
}
|
||||
},
|
||||
table: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:$V1,13:$V2,14:$V3,15:$V4},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:13,11:$V1,13:$V2,14:$V3,15:$V4},o($V0,[2,5]),o($V0,[2,6]),{12:[1,14]},o($V0,[2,9]),o($V0,[2,10]),{16:[1,15]},o($V0,[2,4]),o($V0,[2,8]),o($V0,[2,11])],
|
||||
|
Reference in New Issue
Block a user