diff --git a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx index 577670e44..4b0313ef2 100644 --- a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx +++ b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx @@ -200,7 +200,6 @@ function WidgetChart(props: Props) { const payload = { ...params, ..._metric.toJson(), - viewType: 'lineChart', }; fetchMetricChartData( _metric, diff --git a/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx b/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx index 2a3594a05..a726fe0b2 100644 --- a/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx +++ b/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx @@ -66,8 +66,23 @@ export default observer(WidgetFormNew); const FilterSection = observer( ({ layout, metric, excludeFilterKeys, excludeCategory }: any) => { + const isTable = metric.metricType === TABLE; + const isHeatMap = metric.metricType === HEATMAP; + const isFunnel = metric.metricType === FUNNEL; + const isInsights = metric.metricType === INSIGHTS; + const isPathAnalysis = metric.metricType === USER_PATH; + const isRetention = metric.metricType === RETENTION; + const canAddSeries = metric.series.length < 3; + + const isSingleSeries = + isTable || + isFunnel || + isHeatMap || + isInsights || + isRetention || + isPathAnalysis; const { t } = useTranslation(); - const allOpen = layout.startsWith('flex-row'); + const allOpen = isSingleSeries || layout.startsWith('flex-row'); const defaultClosed = React.useRef(!allOpen && metric.exists()); const [seriesCollapseState, setSeriesCollapseState] = React.useState< Record @@ -84,21 +99,6 @@ const FilterSection = observer( }); setSeriesCollapseState(defaultSeriesCollapseState); }, [metric.series]); - const isTable = metric.metricType === TABLE; - const isHeatMap = metric.metricType === HEATMAP; - const isFunnel = metric.metricType === FUNNEL; - const isInsights = metric.metricType === INSIGHTS; - const isPathAnalysis = metric.metricType === USER_PATH; - const isRetention = metric.metricType === RETENTION; - const canAddSeries = metric.series.length < 3; - - const isSingleSeries = - isTable || - isFunnel || - isHeatMap || - isInsights || - isRetention || - isPathAnalysis; const collapseAll = () => { setSeriesCollapseState((seriesCollapseState) => {