File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
packages/frontend/src/components/Content Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from 'react';
22import { createChart } from '../charts/createChart' ;
33import { ChartProps } from '../charts' ;
44import {
5+ EmptyFilterSet ,
56 HistogramDataArray ,
67 useGetGetMultiIndexAggregationQuery ,
78} from '@gen3/core' ;
@@ -17,8 +18,17 @@ interface ChartContentProps {
1718const ChartContent = ( { chartType, parameters } : ChartContentProps ) => {
1819 const chart : ChartProps = parameters ?. chart ;
1920 const dataFunctionParameters = parameters ?. dataFetch ;
21+
22+ const processedDataFunctionParameters = dataFunctionParameters ?. map (
23+ ( props : any ) => ( {
24+ ...props ,
25+ filters : EmptyFilterSet ,
26+ } ) ,
27+ ) ;
28+
2029 const { data, isFetching, isError } = useGetGetMultiIndexAggregationQuery (
21- dataFunctionParameters ,
30+ processedDataFunctionParameters ,
31+ { skip : ! processedDataFunctionParameters } ,
2232 ) ;
2333
2434 if ( ! chartType ) {
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ const LandingPageContent = ({ content }: LandingPageContentProp) => {
131131 </ div >
132132 ) ;
133133 }
134- if ( obj . type === ' chart' ) {
134+ if ( obj ?. chart ) {
135135 return (
136136 < div key = "chart" className = "h-full relative" >
137137 < ChartContent
You can’t perform that action at this time.
0 commit comments