From 0de97b676dfe4a46d4a067c6795ac04ff085e0b8 Mon Sep 17 00:00:00 2001 From: Jose Farias Date: Fri, 19 Apr 2024 19:05:27 -0600 Subject: [PATCH] Draw empty time series chart if less than 2 data points --- app/javascript/controllers/time_series_chart_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/controllers/time_series_chart_controller.js b/app/javascript/controllers/time_series_chart_controller.js index bcb1366e..750fceb1 100644 --- a/app/javascript/controllers/time_series_chart_controller.js +++ b/app/javascript/controllers/time_series_chart_controller.js @@ -62,7 +62,7 @@ export default class extends Controller { #draw() { - if (this.#dataPoints.length == 0) { + if (this.#dataPoints.length < 2) { this.#drawEmpty() } else if (this.#isFullChart) { this.#drawFullChart()