From 6a853ca29d072d29fcf6d6e2f90b23e7b01f5db7 Mon Sep 17 00:00:00 2001 From: Arjun Choudhary Date: Sat, 26 Nov 2022 11:34:31 +0530 Subject: [PATCH] feat: Allow y-region colours --- src/js/utils/draw.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/utils/draw.js b/src/js/utils/draw.js index 7640eb0..d5a273e 100644 --- a/src/js/utils/draw.js +++ b/src/js/utils/draw.js @@ -563,8 +563,8 @@ export function yRegion(y1, y2, width, label, options = {}) { let rect = createSVG("rect", { className: `bar mini`, // remove class styles: { - fill: `rgba(228, 234, 239, 0.49)`, - stroke: BASE_LINE_COLOR, + fill: options.fill || `rgba(228, 234, 239, 0.49)`, + stroke: options.stroke || BASE_LINE_COLOR, "stroke-dasharray": `${width}, ${height}`, }, // 'data-point-index': index,