diff --git a/src/core/react/components/Visualization/transformers/AreaChartTransformer.ts b/src/core/react/components/Visualization/transformers/AreaChartTransformer.ts index cb8507d8..cf3d7779 100644 --- a/src/core/react/components/Visualization/transformers/AreaChartTransformer.ts +++ b/src/core/react/components/Visualization/transformers/AreaChartTransformer.ts @@ -95,7 +95,7 @@ export class AreaChartTransformer { let xEncodings = Array.isArray(config.encoding.x) ? config.encoding.x : [config.encoding.x]; const yEncodings = Array.isArray(config.encoding.y) ? config.encoding.y : [config.encoding.y]; const colorEncoding = config.encoding.color; - const isStacked = config.mark?.stack === true; + const isStacked = config.mark?.stack === true || config.stacked === true; // Ensure correct encoding type for x-axis (detect temporal fields) if (xEncodings[0] && tableProperties) { diff --git a/src/core/react/components/Visualization/transformers/BarChartTransformer.ts b/src/core/react/components/Visualization/transformers/BarChartTransformer.ts index a59388b4..5827e0a7 100644 --- a/src/core/react/components/Visualization/transformers/BarChartTransformer.ts +++ b/src/core/react/components/Visualization/transformers/BarChartTransformer.ts @@ -137,7 +137,7 @@ export class BarChartTransformer { const seriesField = (colorEncoding?.field && colorEncoding.field !== xEncoding.field) ? colorEncoding.field : undefined; - const isStacked = config.mark?.stack === true; + const isStacked = config.mark?.stack === true || config.stacked === true; // Check if yField is an option type or other non-numeric field const yFieldProperty = tableProperties?.find(prop => prop.name === yEncoding.field);