diff --git a/app/charts/pie/chart-pie.tsx b/app/charts/pie/chart-pie.tsx index 30234a0a3..fd915c61f 100644 --- a/app/charts/pie/chart-pie.tsx +++ b/app/charts/pie/chart-pie.tsx @@ -75,44 +75,42 @@ export const ChartPieVisualization = ({ ); }; -export const ChartPie = memo( - (props: ChartProps & { published: boolean }) => { - const { chartConfig, observations, dimensions, published } = props; - const { fields, interactiveFiltersConfig } = chartConfig; - const somePositive = observations.some( - (d) => (d[fields?.y?.componentIri] as number) > 0 - ); - const filters = useChartConfigFilters(chartConfig); +export const ChartPie = memo((props: ChartProps) => { + const { chartConfig, observations, dimensions } = props; + const { fields, interactiveFiltersConfig } = chartConfig; + const somePositive = observations.some( + (d) => (d[fields?.y?.componentIri] as number) > 0 + ); + const filters = useChartConfigFilters(chartConfig); - if (!somePositive) { - return ; - } + if (!somePositive) { + return ; + } - return ( - - - - - - - - - {fields.animation && ( - - )} - + + + + + + + + {fields.animation && ( + - - - ); - } -); + )} + + + + ); +}); diff --git a/app/charts/scatterplot/chart-scatterplot.tsx b/app/charts/scatterplot/chart-scatterplot.tsx index b18d56c81..6416075ea 100644 --- a/app/charts/scatterplot/chart-scatterplot.tsx +++ b/app/charts/scatterplot/chart-scatterplot.tsx @@ -87,44 +87,42 @@ export const ChartScatterplotVisualization = ({ ); }; -export const ChartScatterplot = memo( - (props: ChartProps & { published: boolean }) => { - const { chartConfig, dimensions, published } = props; - const { fields, interactiveFiltersConfig } = chartConfig; - const filters = useChartConfigFilters(chartConfig); +export const ChartScatterplot = memo((props: ChartProps) => { + const { chartConfig, dimensions } = props; + const { fields, interactiveFiltersConfig } = chartConfig; + const filters = useChartConfigFilters(chartConfig); - return ( - - - - - - - - - - - - - {(fields.animation || fields.segment) && ( - - {fields.animation && ( - - )} - {fields.segment && ( - - )} - - )} - - ); - } -); + return ( + + + + + + + + + + + + + {(fields.animation || fields.segment) && ( + + {fields.animation && ( + + )} + {fields.segment && ( + + )} + + )} + + ); +}); diff --git a/app/charts/shared/chart-data-filters.tsx b/app/charts/shared/chart-data-filters.tsx index ecf3522ac..400b356b0 100644 --- a/app/charts/shared/chart-data-filters.tsx +++ b/app/charts/shared/chart-data-filters.tsx @@ -7,7 +7,6 @@ import { useClient } from "urql"; import { useQueryFilters } from "@/charts/shared/chart-helpers"; import { useLoadingState } from "@/charts/shared/chart-loading-state"; -import { ChartFiltersList } from "@/components/chart-filters-list"; import Flex from "@/components/flex"; import { Select } from "@/components/form"; import { Loading } from "@/components/hint"; @@ -132,39 +131,41 @@ export const ChartDataFilters = (props: ChartDataFiltersProps) => { ) : ( - + - - {componentIris.length > 0 && (