From 2398551cac4032cf551145aaf7d574d412f73cf4 Mon Sep 17 00:00:00 2001 From: Dhiraj Barnwal Date: Fri, 15 Dec 2023 19:39:49 +0530 Subject: [PATCH] Fix negative SVG values in Graphic Context (#3673) --- .../time-series/TimeSeriesChartContainer.svelte | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/web-common/src/features/dashboards/time-series/TimeSeriesChartContainer.svelte b/web-common/src/features/dashboards/time-series/TimeSeriesChartContainer.svelte index 13d688e95cf..e28666dc3f9 100644 --- a/web-common/src/features/dashboards/time-series/TimeSeriesChartContainer.svelte +++ b/web-common/src/features/dashboards/time-series/TimeSeriesChartContainer.svelte @@ -26,12 +26,14 @@ A container GraphicContext for the time series in a metrics dashboard. right={50} fontSize={11} top={4} - width={(enableFullWidth - ? workspaceWidth - paddingForFullWidth - : workspaceWidth >= MEASURE_CONFIG.breakpoint - ? MEASURE_CONFIG.container.width.full - : MEASURE_CONFIG.container.width.breakpoint) - - MEASURE_CONFIG.bigNumber.widthWithChart} + width={Math.max( + enableFullWidth + ? workspaceWidth - paddingForFullWidth + : workspaceWidth >= MEASURE_CONFIG.breakpoint + ? MEASURE_CONFIG.container.width.full + : MEASURE_CONFIG.container.width.breakpoint, + 400 + ) - MEASURE_CONFIG.bigNumber.widthWithChart} xMax={end} xMaxTweenProps={{ duration: 400 }} xMin={start}