Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix: if set metrics visuall

kruzhambus8b39f69e6226
diff --git a/src/pages/Project/View/ViewProject.jsx b/src/pages/Project/View/ViewProject.jsx
index e5cb76c4c..05090b3c2 100644
--- a/src/pages/Project/View/ViewProject.jsx
+++ b/src/pages/Project/View/ViewProject.jsx
@@ -601,13 +601,18 @@ const ViewProject = ({
}
}
} else if (!isLoading && !_isEmpty(chartDataPerf) && !_isEmpty(mainChart)) {
- mainChart.data.names(dataNames)
+ const applyRegions = !_includes(noRegionPeriods, activePeriod.period)
+ const bbSettings = getSettingsPerf(chartDataPerf, timeBucket, activeChartMetricsPerf, applyRegions)
- if (activeChartMetricsPerf) {
- mainChart.load({
- columns: getColumnsPerf(chartDataPerf, activeChartMetricsPerf),
- })
+ if (!_isEmpty(mainChart)) {
+ mainChart.destroy()
}
+
+ setMainChart(() => {
+ const generete = bb.generate(bbSettings)
+ generete.data.names(dataNamesPerf)
+ return generete
+ })
}
}, [isLoading, activeChartMetrics, chartData, chartDataPerf, activeChartMetricsPerf]) // eslint-disable-line