Add missing dependency to LineGraph useEffect

This commit is contained in:
Aurora Lahtela 2022-10-16 14:23:40 +03:00
parent 18801a4757
commit 8c1a357323

View File

@ -41,7 +41,7 @@ const LineGraph = ({id, series, legendEnabled, tall, yAxis, selectedRange, extre
}, },
series: series series: series
})); }));
}, [series, graphTheming, id, t, nightModeEnabled, legendEnabled, yAxis, onSetExtremes, setGraph, onSetExtremes]) }, [series, graphTheming, id, t, nightModeEnabled, legendEnabled, yAxis, onSetExtremes, setGraph, onSetExtremes, selectedRange])
useEffect(() => { useEffect(() => {
if (graph && extremes) { if (graph && extremes) {
graph.xAxis[0].setExtremes(extremes.min, extremes.max); graph.xAxis[0].setExtremes(extremes.min, extremes.max);