Description
I'm using the mermaid package in Vue.js. I can successfully generate flowcharts - but if I paste in the samples for sequence or gantt - it does not successfully generate them. Are other people using mermaidAPI successfuly with gantt charts?
import mermaidAPI from 'mermaid'
in mounted
var config = {
startOnLoad: false
};
mermaidAPI.initialize(config);
this.mermaidEle = this.$el.querySelector("#therapy123")
var that = this
this.insertSvg = function(svgCode, bindFunctions) {
that.mermaidEle.innerHTML = svgCode;
}
in render method
var graphCode = 'gantt\n' +
'dateFormat YYYY-MM-DD\n' +
'title Adding GANTT diagram to mermaid\n' +
'\n' +
'section A section\n' +
'Completed task :done, des1, 2014-01-06,2014-01-08\n' +
'Active task :active, des2, 2014-01-09, 3d\n' +
'Future task : des3, after des2, 5d\n' +
'Future task2 : des4, after des3, 5d',
var graph = mermaidAPI.render("therapy123", graphCode, this.insertSvg);