mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Candlestick: re-init config when series length changes (#56913)
This commit is contained in:
parent
53ac77d4a5
commit
4eea326ee8
@ -47,7 +47,7 @@ export const CandlestickPanel: React.FC<CandlestickPanelProps> = ({
|
||||
const theme = useTheme2();
|
||||
|
||||
const info = useMemo(() => {
|
||||
return prepareCandlestickFields(data?.series, options, theme, timeRange);
|
||||
return prepareCandlestickFields(data.series, options, theme, timeRange);
|
||||
}, [data, options, theme, timeRange]);
|
||||
|
||||
const { renderers, tweakScale, tweakAxis } = useMemo(() => {
|
||||
@ -212,7 +212,7 @@ export const CandlestickPanel: React.FC<CandlestickPanelProps> = ({
|
||||
tweakAxis,
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [options, data.structureRev]);
|
||||
}, [options, data.structureRev, data.series.length]);
|
||||
|
||||
if (!info) {
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user