diff --git a/js/src/chartviewmodel.js b/js/src/chartviewmodel.js index 0070dee..b8d2d22 100644 --- a/js/src/chartviewmodel.js +++ b/js/src/chartviewmodel.js @@ -130,7 +130,9 @@ export default class ChartViewModel extends ViewModel { this.model.chartVisible = !this.model.chartVisible; }; this.model.onMenuToggle = () => { - this.chart.update(); + if (this.model.chartVisible) { + this.chart.update(); + } }; }