From 11a3ee00efaf72f51b11672f7daab989f63bb76e Mon Sep 17 00:00:00 2001 From: HugoCasa Date: Thu, 7 Sep 2023 17:36:19 +0200 Subject: [PATCH] fix: benchmark svg (#2249) --- benchmarks/graph.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/benchmarks/graph.ts b/benchmarks/graph.ts index f10521d57e..474533581c 100644 --- a/benchmarks/graph.ts +++ b/benchmarks/graph.ts @@ -22,10 +22,19 @@ export function drawGraph(data: DataPoint[], title: string) { const marginBottom = 30; const marginLeft = 60; - const svg = body + let svg = body .append("svg") + .attr("xmlns", "http://www.w3.org/2000/svg") .attr("width", width + marginLeft + marginRight) - .attr("height", height + marginTop + marginBottom) + .attr("height", height + marginTop + marginBottom); + + svg + .append("rect") + .attr("width", "100%") + .attr("height", "100%") + .attr("fill", "white"); + + svg = svg .append("g") .attr("transform", "translate(" + marginLeft + "," + marginTop + ")");