diff --git a/packages/mermaid/src/diagrams/gantt/ganttRenderer.js b/packages/mermaid/src/diagrams/gantt/ganttRenderer.js index aee05ffc3..820f4c805 100644 --- a/packages/mermaid/src/diagrams/gantt/ganttRenderer.js +++ b/packages/mermaid/src/diagrams/gantt/ganttRenderer.js @@ -286,21 +286,13 @@ export const draw = function (text, id, version, diagObj) { 0.5 * theBarHeight ); } - // if (d.vert) { - // return ( - // timeScale(d.startTime) + - // theSidePad + - // 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - - // 0.5 * theBarHeight - // ); - // } return timeScale(d.startTime) + theSidePad; }) .attr('y', function (d, i) { // Ignore the incoming i value and use our order instead i = d.order; if (d.vert) { - return 0; + return conf.gridLineStartPadding; } return i * theGap + theTopPad; }) @@ -309,18 +301,13 @@ export const draw = function (text, id, version, diagObj) { return theBarHeight; } if (d.vert) { - return 0.005 * theBarHeight; + return 0.08 * theBarHeight; } return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime); }) - // .attr('height', theBarHeight) .attr('height', function (d) { if (d.vert) { - return ( - conf.gridLineStartPadding + - taskArray.length * (conf.barHeight + conf.barGap) + - conf.barHeight * 2 - ); + return taskArray.length * (conf.barHeight + conf.barGap) + conf.barHeight * 2; } return theBarHeight; }) @@ -407,9 +394,6 @@ export const draw = function (text, id, version, diagObj) { if (d.milestone) { startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; } - if (d.special) { - return startX + theSidePad - 5; - } if (d.milestone) { endX = startX + theBarHeight; } diff --git a/packages/mermaid/src/diagrams/gantt/styles.js b/packages/mermaid/src/diagrams/gantt/styles.js index c8a9c1660..5b32615a0 100644 --- a/packages/mermaid/src/diagrams/gantt/styles.js +++ b/packages/mermaid/src/diagrams/gantt/styles.js @@ -237,8 +237,13 @@ const getStyles = (options) => fill: ${options.taskTextDarkColor} !important; } + .vert { + stroke: navy; + } + .vertText { font-size: 15px; + fill: navy; } .activeCritText0,