diff --git a/app/configurator/components/chart-controls/color-ramp.tsx b/app/configurator/components/chart-controls/color-ramp.tsx index 819946409..eb6a65506 100644 --- a/app/configurator/components/chart-controls/color-ramp.tsx +++ b/app/configurator/components/chart-controls/color-ramp.tsx @@ -54,11 +54,15 @@ export const ColorRamp = ({ return ; }; +type MapField = "areaLayer"; +type MapPath = "palette"; + type ColorRampFieldProps = Omit & { - field: string; - path: string; + field: MapField; + path: MapPath; }; +// Currently only usable in areaLayer (map chart)! export const ColorRampField = ({ field, path, diff --git a/app/configurator/map/map-chart-options.tsx b/app/configurator/map/map-chart-options.tsx index a1747ee34..3b1c5b18b 100644 --- a/app/configurator/map/map-chart-options.tsx +++ b/app/configurator/map/map-chart-options.tsx @@ -38,16 +38,11 @@ export const MapColumnOptions = ({ return ; case "areaLayer": return ( - + ); case "symbolLayer": return ( @@ -87,14 +82,13 @@ export const BaseLayersSettings = memo(() => { export const AreaLayerSettings = memo( ({ - activeField, chartConfig, metaData, }: { - activeField: string; chartConfig: MapConfig; metaData: DataCubeMetadata; }) => { + const activeField = "areaLayer"; const geoShapesDimensions = useMemo( () => getGeoShapesDimensions(metaData.dimensions), [metaData.dimensions] @@ -304,14 +298,13 @@ export const AreaLayerSettings = memo( export const SymbolLayerSettings = memo( ({ - activeField, chartConfig, metaData, }: { - activeField: string; chartConfig: MapConfig; metaData: DataCubeMetadata; }) => { + const activeField = "symbolLayer"; const geoDimensions = useMemo( () => getGeoDimensions(metaData.dimensions), [metaData.dimensions]