From 4eea326ee8331d1dc2f6138530ef67dd3b0c1a79 Mon Sep 17 00:00:00 2001 From: Leon Sorokin Date: Fri, 14 Oct 2022 04:12:28 -0500 Subject: [PATCH] Candlestick: re-init config when series length changes (#56913) --- public/app/plugins/panel/candlestick/CandlestickPanel.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/candlestick/CandlestickPanel.tsx b/public/app/plugins/panel/candlestick/CandlestickPanel.tsx index aa4544ebb71..a3bb863de56 100644 --- a/public/app/plugins/panel/candlestick/CandlestickPanel.tsx +++ b/public/app/plugins/panel/candlestick/CandlestickPanel.tsx @@ -47,7 +47,7 @@ export const CandlestickPanel: React.FC = ({ 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 = ({ tweakAxis, }; // eslint-disable-next-line react-hooks/exhaustive-deps - }, [options, data.structureRev]); + }, [options, data.structureRev, data.series.length]); if (!info) { return (