From d5cde8c605ae5819c525350df957a278ea3cc474 Mon Sep 17 00:00:00 2001 From: Juned Chhipa Date: Tue, 24 Sep 2024 20:18:14 +0530 Subject: [PATCH] fix #1832; add check if data empty for annotations --- src/modules/annotations/Annotations.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/annotations/Annotations.js b/src/modules/annotations/Annotations.js index c206f596a..cfe1c842f 100644 --- a/src/modules/annotations/Annotations.js +++ b/src/modules/annotations/Annotations.js @@ -35,7 +35,8 @@ export default class Annotations { drawAxesAnnotations() { const w = this.w - if (w.globals.axisCharts) { + if (w.globals.axisCharts && w.globals.dataPoints) { + // w.globals.dataPoints check added to fix #1832 let yAnnotations = this.yAxisAnnotations.drawYAxisAnnotations() let xAnnotations = this.xAxisAnnotations.drawXAxisAnnotations() let pointAnnotations = this.pointsAnnotations.drawPointAnnotations()