diff --git a/extension/src/plots/model/index.ts b/extension/src/plots/model/index.ts index 82d21eac81..9139820ad6 100644 --- a/extension/src/plots/model/index.ts +++ b/extension/src/plots/model/index.ts @@ -415,7 +415,7 @@ export class PlotsModel extends ModelWithPersistence { await Promise.all([ collectData(output), collectTemplates(output), - collectMultiSourceVariations(output, this.multiSourceVariations) + collectMultiSourceVariations(output) ]) this.comparisonData = { diff --git a/extension/src/plots/multiSource/collect.ts b/extension/src/plots/multiSource/collect.ts index 76bcd9db8b..9d27a75203 100644 --- a/extension/src/plots/multiSource/collect.ts +++ b/extension/src/plots/multiSource/collect.ts @@ -85,10 +85,8 @@ const collectPathMultiSourceVariations = ( } } -export const collectMultiSourceVariations = ( - output: PlotsOutput, - acc: Record[]> -) => { +export const collectMultiSourceVariations = (output: PlotsOutput) => { + const acc: Record[]> = {} const { data } = output for (const [path, plots] of Object.entries(data)) { collectPathMultiSourceVariations(acc, path, plots) @@ -275,6 +273,8 @@ const collectUnmergedShapeEncoding = ( } } +// this is how we can collect the encoding for multi-source plots +// we need to pass in the anchors that we want to fill as well const collectPathMultiSourceEncoding = ( acc: MultiSourceEncoding, path: string,