Added permananet color for the vertical line

This commit is contained in:
nghtlinh
2025-04-09 16:13:34 -04:00
parent 5bbc9b4f5b
commit 2203792164
2 changed files with 8 additions and 19 deletions

View File

@@ -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;
}

View File

@@ -237,8 +237,13 @@ const getStyles = (options) =>
fill: ${options.taskTextDarkColor} !important;
}
.vert {
stroke: navy;
}
.vertText {
font-size: 15px;
fill: navy;
}
.activeCritText0,