Skip to content
Snippets Groups Projects
Commit 4217fdcf authored by Yan, Andrew N.'s avatar Yan, Andrew N.
Browse files

use a differently oriented hash for current and compare masks

parent 803bea12
No related branches found
No related tags found
No related merge requests found
......@@ -79,12 +79,20 @@ const plotDataLine = function (elem, {visible, lines, tsDataKey, xScale, yScale}
.attr('height', Math.abs(yScale(yRangeEnd)- yScale(yRangeStart)))
.attr('class', 'generic-mask');
let patternId;
if (tsDataKey === 'compare') {
patternId = 'url(#hash-135)';
}
else {
patternId = 'url(#hash-45)';
}
maskGroup.append('rect')
.attr('x', xScale(xDomainStart))
.attr('y', yScale(yRangeEnd))
.attr('width', xScale(xDomainEnd) - xScale(xDomainStart))
.attr('height', Math.abs(yScale(yRangeEnd)- yScale(yRangeStart)))
.attr('fill', 'url(#hash-45)');
.attr('fill', patternId);
}
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment