From 0da1e66ba5cac9927f6138f8382fe750e0c85264 Mon Sep 17 00:00:00 2001 From: Marcel Gerber Date: Mon, 4 Mar 2024 16:20:18 +0100 Subject: [PATCH] fix(static-chart): don't render chart on table tab --- .../grapher/src/captionedChart/CaptionedChart.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/@ourworldindata/grapher/src/captionedChart/CaptionedChart.tsx b/packages/@ourworldindata/grapher/src/captionedChart/CaptionedChart.tsx index f7c35d7dddd..bb5c5d1bfa8 100644 --- a/packages/@ourworldindata/grapher/src/captionedChart/CaptionedChart.tsx +++ b/packages/@ourworldindata/grapher/src/captionedChart/CaptionedChart.tsx @@ -608,7 +608,13 @@ export class StaticCaptionedChart extends CaptionedChart { targetX={paddedBounds.x} targetY={paddedBounds.y} /> - {this.renderChart()} + + {/* + We cannot render a table to svg, but would rather display nothing at all to avoid issues. + See https://github.com/owid/owid-grapher/issues/3283 + */} + {this.manager.isOnTableTab ? undefined : this.renderChart()} +