@gooddata/sdk-ui-charts 11.50.0 → 11.51.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"chartOptionsBuilder.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartOptions/chartOptionsBuilder.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAyD,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACzG,OAAO,EAEH,cAAc,EACd,KAAK,gBAAgB,EAGxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,cAAc,EAA0B,MAAM,8BAA8B,CAAC;AAE3F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AASvE,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAEH,KAAK,aAAa,EAClB,KAAK,WAAW,EAEnB,MAAM,yBAAyB,CAAC;AA2JjC,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,wBAAgB,qBAAqB,CACjC,MAAM,2BAAoB,EAC1B,aAAa,EAAE,cAAc,GAC9B,2BAA2B,EAAE,CAoC/B;AAED,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,cAAc,GAAG,iBAAiB,CAuBjF;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,cAAc,GAAG,iBAAiB,CA4C1E;AAED,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,cAAc,GAAG,iBAAiB,CAmB9E;AAED,KAAK,iBAAiB,GAAG;IACrB,eAAe,CAAC,EAAE,mCAAmC,GAAG,IAAI,CAAC;IAC7D,qBAAqB,CAAC,EAAE,mCAAmC,GAAG,IAAI,CAAC;IACnE,gBAAgB,CAAC,EAAE,mCAAmC,GAAG,IAAI,CAAC;IAC9D,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAC;AA8EF,wBAAgB,eAAe,CAC3B,QAAQ,EAAE,SAAS,EACnB,WAAW,EAAE,YAAY,EACzB,cAAc,EAAE,gBAAgB,EAAE,EAClC,gBAAgB,EAAE,MAAM,EACxB,KAAK,CAAC,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,EACzB,YAAY,CAAC,EAAE,MAAM,EACrB,cAAc,CAAC,EAAE,MAAM,EACvB,cAAc,CAAC,EAAE,MAAM,GACxB,aAAa,CAief"}
1
+ {"version":3,"file":"chartOptionsBuilder.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartOptions/chartOptionsBuilder.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAyD,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACzG,OAAO,EAEH,cAAc,EACd,KAAK,gBAAgB,EAGxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,cAAc,EAA0B,MAAM,8BAA8B,CAAC;AAE3F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AASvE,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAEH,KAAK,aAAa,EAClB,KAAK,WAAW,EAEnB,MAAM,yBAAyB,CAAC;AA+JjC,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,wBAAgB,qBAAqB,CACjC,MAAM,2BAAoB,EAC1B,aAAa,EAAE,cAAc,GAC9B,2BAA2B,EAAE,CAoC/B;AAED,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,cAAc,GAAG,iBAAiB,CAuBjF;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,cAAc,GAAG,iBAAiB,CA4C1E;AAED,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,cAAc,GAAG,iBAAiB,CAmB9E;AAED,KAAK,iBAAiB,GAAG;IACrB,eAAe,CAAC,EAAE,mCAAmC,GAAG,IAAI,CAAC;IAC7D,qBAAqB,CAAC,EAAE,mCAAmC,GAAG,IAAI,CAAC;IACnE,gBAAgB,CAAC,EAAE,mCAAmC,GAAG,IAAI,CAAC;IAC9D,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAC;AAsFF,wBAAgB,eAAe,CAC3B,QAAQ,EAAE,SAAS,EACnB,WAAW,EAAE,YAAY,EACzB,cAAc,EAAE,gBAAgB,EAAE,EAClC,gBAAgB,EAAE,MAAM,EACxB,KAAK,CAAC,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,EACzB,YAAY,CAAC,EAAE,MAAM,EACrB,cAAc,CAAC,EAAE,MAAM,EACvB,cAAc,CAAC,EAAE,MAAM,GACxB,aAAa,CAief"}
@@ -9,7 +9,7 @@ import { getChartProperties } from "../_chartCreators/helpers.js";
9
9
  import { isAreaChart, isBubbleChart, isChartSupported, isComboChart, isHeatmap, isMekko, isOneOfTypes, isPyramid, isSankeyOrDependencyWheel, isScatterPlot, isTreemap, isWaterfall, stringifyChartTypes, unwrap, } from "../_util/common.js";
10
10
  import { findAttributeInDimension, findMeasureGroupInDimensions } from "../_util/executionResultHelper.js";
11
11
  import { canComboChartBeStackedInPercent, getComboChartSeries, getComboChartStackingConfig, } from "../comboChart/comboChartOptions.js";
12
- import { dropZeroWidthMekkoColumns, isMekkoPercentBlockedByNegatives } from "../mekko/mekkoChartOptions.js";
12
+ import { collapseMekkoViewByItems, dropZeroWidthMekkoColumns, isMekkoPercentBlockedByNegatives, } from "../mekko/mekkoChartOptions.js";
13
13
  import { buildWaterfallChartSeries, getColorAssignment, getWaterfallChartCategories, } from "../waterfallChart/waterfallChartOptions.js";
14
14
  import { assignYAxes, getXAxes, getYAxes } from "./chartAxes.js";
15
15
  import { multiMeasuresAlternatingTypes, showingNameInLegendWhenViewByPresent, unsupportedStackingTypes, } from "./chartCapabilities.js";
@@ -194,6 +194,13 @@ function chartedAttributeDiscovery(dv, chartType) {
194
194
  if (isScatterPlot(chartType)) {
195
195
  return getScatterPlotAttributes(dv);
196
196
  }
197
+ if (isMekko(chartType)) {
198
+ const attributes = defaultChartedAttributeDiscovery(dv);
199
+ return {
200
+ ...attributes,
201
+ viewByAttribute: collapseMekkoViewByItems(dv, attributes.viewByAttribute ?? undefined),
202
+ };
203
+ }
197
204
  return defaultChartedAttributeDiscovery(dv);
198
205
  }
199
206
  function getLegendLabel(type, viewByAttribute, stackByAttribute) {
@@ -1,4 +1,13 @@
1
+ import { type DataViewFacade } from "@gooddata/sdk-ui";
2
+ import { type IUnwrappedAttributeHeadersWithItems } from "../../typings/mess.js";
1
3
  import { type ISeriesItem } from "../../typings/unsafe.js";
4
+ /**
5
+ * Stacked Mekko executes with [[stackBy], [viewBy, MeasureGroup]], so the view-by header items
6
+ * enumerate view × measure combinations. Downstream consumers (categories, point names, drills)
7
+ * index them by column, so collapse to one item per view value. No-op without a measure group
8
+ * in the view-by dimension or with fewer than two measures.
9
+ */
10
+ export declare function collapseMekkoViewByItems(dv: DataViewFacade, viewByAttribute: IUnwrappedAttributeHeadersWithItems | undefined): IUnwrappedAttributeHeadersWithItems | undefined;
2
11
  /**
3
12
  * Mekko can't stack to 100% with negative Height values (percent of mixed-sign segments is
4
13
  * undefined) — it falls back to absolute stacking. Evaluated once in getChartOptions and exposed
@@ -1 +1 @@
1
- {"version":3,"file":"mekkoChartOptions.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/mekko/mekkoChartOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC5C,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,GAClC,OAAO,CAET;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAC/C,MAAM,EAAE,WAAW,EAAE,EACrB,UAAU,EAAE,SAAS,EAAE,GACxB;IAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IAAC,UAAU,EAAE,SAAS,EAAE,CAAA;CAAE,CAkBpD"}
1
+ {"version":3,"file":"mekkoChartOptions.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/mekko/mekkoChartOptions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACpC,EAAE,EAAE,cAAc,EAClB,eAAe,EAAE,mCAAmC,GAAG,SAAS,GACjE,mCAAmC,GAAG,SAAS,CAiBjD;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC5C,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,GAClC,OAAO,CAET;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAC/C,MAAM,EAAE,WAAW,EAAE,EACrB,UAAU,EAAE,SAAS,EAAE,GACxB;IAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IAAC,UAAU,EAAE,SAAS,EAAE,CAAA;CAAE,CAkBpD"}
@@ -1,5 +1,28 @@
1
1
  // (C) 2026 GoodData Corporation
2
+ import { isMeasureGroupDescriptor } from "@gooddata/sdk-model";
3
+ import { VIEW_BY_DIMENSION_INDEX } from "../../constants/dimensions.js";
2
4
  import { isMekko, isNegativeValueIncluded } from "../_util/common.js";
5
+ /**
6
+ * Stacked Mekko executes with [[stackBy], [viewBy, MeasureGroup]], so the view-by header items
7
+ * enumerate view × measure combinations. Downstream consumers (categories, point names, drills)
8
+ * index them by column, so collapse to one item per view value. No-op without a measure group
9
+ * in the view-by dimension or with fewer than two measures.
10
+ */
11
+ export function collapseMekkoViewByItems(dv, viewByAttribute) {
12
+ if (!viewByAttribute) {
13
+ return viewByAttribute;
14
+ }
15
+ const viewByDimension = dv.meta().dimensions()[VIEW_BY_DIMENSION_INDEX];
16
+ const measureGroup = viewByDimension?.headers?.find(isMeasureGroupDescriptor);
17
+ const measureCount = measureGroup?.measureGroupHeader.items.length ?? 0;
18
+ if (measureCount <= 1) {
19
+ return viewByAttribute;
20
+ }
21
+ return {
22
+ ...viewByAttribute,
23
+ items: viewByAttribute.items.filter((_, index) => index % measureCount === 0),
24
+ };
25
+ }
3
26
  /**
4
27
  * Mekko can't stack to 100% with negative Height values (percent of mixed-sign segments is
5
28
  * undefined) — it falls back to absolute stacking. Evaluated once in getChartOptions and exposed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-charts",
3
- "version": "11.50.0",
3
+ "version": "11.51.0-alpha.1",
4
4
  "description": "GoodData.UI SDK - Charts",
5
5
  "license": "LicenseRef-LICENSE",
6
6
  "author": "GoodData Corporation",
@@ -69,13 +69,13 @@
69
69
  "ts-invariant": "0.10.3",
70
70
  "tslib": "2.8.1",
71
71
  "uuid": "11.1.1",
72
- "@gooddata/sdk-backend-spi": "11.50.0",
73
- "@gooddata/sdk-model": "11.50.0",
74
- "@gooddata/sdk-ui": "11.50.0",
75
- "@gooddata/sdk-ui-kit": "11.50.0",
76
- "@gooddata/sdk-ui-theme-provider": "11.50.0",
77
- "@gooddata/util": "11.50.0",
78
- "@gooddata/sdk-ui-vis-commons": "11.50.0"
72
+ "@gooddata/sdk-backend-spi": "11.51.0-alpha.1",
73
+ "@gooddata/sdk-model": "11.51.0-alpha.1",
74
+ "@gooddata/sdk-ui": "11.51.0-alpha.1",
75
+ "@gooddata/sdk-ui-kit": "11.51.0-alpha.1",
76
+ "@gooddata/sdk-ui-theme-provider": "11.51.0-alpha.1",
77
+ "@gooddata/util": "11.51.0-alpha.1",
78
+ "@gooddata/sdk-ui-vis-commons": "11.51.0-alpha.1"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@microsoft/api-documenter": "^7.17.0",
@@ -120,11 +120,11 @@
120
120
  "typescript": "5.9.3",
121
121
  "vitest": "4.1.8",
122
122
  "vitest-dom": "0.1.1",
123
- "@gooddata/eslint-config": "11.50.0",
124
- "@gooddata/oxlint-config": "11.50.0",
125
- "@gooddata/sdk-backend-mockingbird": "11.50.0",
126
- "@gooddata/reference-workspace": "11.50.0",
127
- "@gooddata/stylelint-config": "11.50.0"
123
+ "@gooddata/eslint-config": "11.51.0-alpha.1",
124
+ "@gooddata/oxlint-config": "11.51.0-alpha.1",
125
+ "@gooddata/reference-workspace": "11.51.0-alpha.1",
126
+ "@gooddata/sdk-backend-mockingbird": "11.51.0-alpha.1",
127
+ "@gooddata/stylelint-config": "11.51.0-alpha.1"
128
128
  },
129
129
  "peerDependencies": {
130
130
  "react": "^18.0.0 || ^19.0.0",