diff --git a/frontend/app/components/Charts/SankeyChart.tsx b/frontend/app/components/Charts/SankeyChart.tsx index 33197da5e..4618d709d 100644 --- a/frontend/app/components/Charts/SankeyChart.tsx +++ b/frontend/app/components/Charts/SankeyChart.tsx @@ -39,26 +39,10 @@ const EChartsSankey: React.FC = (props) => { const { data, height = 240, onChartClick, isUngrouped } = props; const chartRef = React.useRef(null); - if (data.nodes.length === 0 || data.links.length === 0) { - return ( - - - Set a start or end point to visualize the journey. If set, try - adjusting filters. - - } - show={true} - /> - ); - } - const [finalNodeCount, setFinalNodeCount] = React.useState(data.nodes.length); React.useEffect(() => { - if (!chartRef.current) return; + if (!chartRef.current || data.nodes.length === 0 || data.links.length === 0) return; let finalNodes = data.nodes; let finalLinks = data.links; @@ -440,6 +424,21 @@ const EChartsSankey: React.FC = (props) => { }; }, [data, height, onChartClick]); + if (data.nodes.length === 0 || data.links.length === 0) { + return ( + + + Set a start or end point to visualize the journey. If set, try + adjusting filters. + + } + show={true} + /> + ); + } let containerStyle: React.CSSProperties; if (isUngrouped) { const dynamicMinHeight = finalNodeCount * 15; diff --git a/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx b/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx index 63aea3cfa..ebf2acd7e 100644 --- a/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx +++ b/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx @@ -207,7 +207,7 @@ const PathAnalysisFilter = observer(({ metric, writeOption }: any) => { Journeys With
writeOption({ name: 'metricValue', value })} placeholder="Select Metrics" - size="small" maxTagCount={'responsive'} showSearch={false} />