diff --git a/app/scripts/components/exploration/data-utils-no-faux-module.ts b/app/scripts/components/exploration/data-utils-no-faux-module.ts index c49804d1a..bfe0927d4 100644 --- a/app/scripts/components/exploration/data-utils-no-faux-module.ts +++ b/app/scripts/components/exploration/data-utils-no-faux-module.ts @@ -17,7 +17,6 @@ import { DATA_METRICS, DEFAULT_DATA_METRICS } from './components/datasets/analysis-metrics'; -import { DEFAULT_COLORMAP } from './components/datasets/colormap-options'; import { utcString2userTzDate } from '$utils/date'; import { DatasetLayer, @@ -64,8 +63,8 @@ function getInitialMetrics(data: DatasetLayer): DataMetric[] { return foundMetrics; } -function getInitialColorMap(dataset: DatasetLayer): string { - return dataset.sourceParams?.colormap_name ?? DEFAULT_COLORMAP; +function getInitialColorMap(dataset: DatasetLayer): string|undefined { + return dataset.sourceParams?.colormap_name; } export function reconcileDatasets( @@ -194,6 +193,10 @@ export function resolveRenderParams( datasetSourceParams: Record | undefined, queryDataRenders: Record | undefined ): Record | undefined { + // Return null if there are no user-configured sourcparams nor render parameter + // so it doesn't get subbed with default values + if (!datasetSourceParams && !queryDataRenders) return undefined; + // Start with sourceParams from the dataset. // Return the source param as it is if exists if (hasValidSourceParams(datasetSourceParams)) {