diff --git a/js/src/chartviewmodel.js b/js/src/chartviewmodel.js index f84c549..289a40b 100644 --- a/js/src/chartviewmodel.js +++ b/js/src/chartviewmodel.js @@ -176,7 +176,9 @@ export default class ChartViewModel extends ViewModel { * @param {string} $className */ pointsRemoveClass($className) { - this.chartPoints.forEach((el) => el.classList.remove($className)); + if (this.model.chartVisible && this.chartPoints) { + this.chartPoints.forEach((el) => el.classList.remove($className)); + } } /**