From 9095b7b81e1b8369325cf526e21147c313eb2e30 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Wed, 24 Feb 2021 19:28:14 -0800 Subject: [PATCH] Prevent -1 dimension errors in LineChart --- ui/app/components/line-chart.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/app/components/line-chart.js b/ui/app/components/line-chart.js index 50212574b..ec8d88852 100644 --- a/ui/app/components/line-chart.js +++ b/ui/app/components/line-chart.js @@ -209,11 +209,11 @@ export default class LineChart extends Component { } get xAxisOffset() { - return this.height - this.xAxisHeight; + return Math.max(0, this.height - this.xAxisHeight); } get yAxisOffset() { - return this.width - this.yAxisWidth; + return Math.max(0, this.width - this.yAxisWidth); } @action