diff --git a/UI/src/views/HistoryView.vue b/UI/src/views/HistoryView.vue index ec19ed3..b223167 100644 --- a/UI/src/views/HistoryView.vue +++ b/UI/src/views/HistoryView.vue @@ -1099,16 +1099,24 @@ const exportHistoryData = () => { }; const resizeCharts = () => { - if (fullscreenPredictionChart.value) fullscreenPredictionChart.value.resize(); - if (fullscreenHistoryChart.value) fullscreenHistoryChart.value.resize(); + if (predictionChart) { + predictionChart.resize(); + } + if (historyChart) { + historyChart.resize(); + } }; window.addEventListener('resize', resizeCharts); onUnmounted(() => { window.removeEventListener('resize', resizeCharts); - if (fullscreenPredictionChart.value) fullscreenPredictionChart.value.dispose(); - if (fullscreenHistoryChart.value) fullscreenHistoryChart.value.dispose(); + if (predictionChart) { + predictionChart.destroy(); + } + if (historyChart) { + historyChart.destroy(); + } }); onMounted(() => {