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 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; return timeScale(d.startTime) + theSidePad;
}) })
.attr('y', function (d, i) { .attr('y', function (d, i) {
// Ignore the incoming i value and use our order instead // Ignore the incoming i value and use our order instead
i = d.order; i = d.order;
if (d.vert) { if (d.vert) {
return 0; return conf.gridLineStartPadding;
} }
return i * theGap + theTopPad; return i * theGap + theTopPad;
}) })
@@ -309,18 +301,13 @@ export const draw = function (text, id, version, diagObj) {
return theBarHeight; return theBarHeight;
} }
if (d.vert) { if (d.vert) {
return 0.005 * theBarHeight; return 0.08 * theBarHeight;
} }
return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime); return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);
}) })
// .attr('height', theBarHeight)
.attr('height', function (d) { .attr('height', function (d) {
if (d.vert) { if (d.vert) {
return ( return taskArray.length * (conf.barHeight + conf.barGap) + conf.barHeight * 2;
conf.gridLineStartPadding +
taskArray.length * (conf.barHeight + conf.barGap) +
conf.barHeight * 2
);
} }
return theBarHeight; return theBarHeight;
}) })
@@ -407,9 +394,6 @@ export const draw = function (text, id, version, diagObj) {
if (d.milestone) { if (d.milestone) {
startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
} }
if (d.special) {
return startX + theSidePad - 5;
}
if (d.milestone) { if (d.milestone) {
endX = startX + theBarHeight; endX = startX + theBarHeight;
} }

View File

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