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 (