@gooddata/sdk-ui-charts 11.43.0-alpha.1 → 11.43.0-alpha.2

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.
package/NOTICE CHANGED
@@ -7,9 +7,9 @@
7
7
 
8
8
  The following 3rd-party software packages may be used by or distributed with gooddata-ui-sdk. Any information relevant to third-party vendors listed below are collected using common, reasonable means.
9
9
 
10
- Date generated: 2026-6-18
10
+ Date generated: 2026-6-19
11
11
 
12
- Revision ID: 9a7112d1a258858d38a40b99546f85cdc462e845
12
+ Revision ID: 3fa6914b6550194ce069d8f1ab41a8a22d3bf58a
13
13
 
14
14
  ================================================================================
15
15
  ================================================================================
@@ -38519,4 +38519,4 @@ POSSIBILITY OF SUCH DAMAGE.
38519
38519
  --------------------------------------------------------------------------------
38520
38520
  --------------------------------------------------------------------------------
38521
38521
 
38522
- Report Generated by FOSSA on 2026-6-18
38522
+ Report Generated by FOSSA on 2026-6-19
@@ -1 +1 @@
1
- {"version":3,"file":"chartAxes.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartOptions/chartAxes.ts"],"names":[],"mappings":"AAIA,OAAO,EAA2B,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA+BvE,wBAAgB,QAAQ,CACpB,EAAE,EAAE,cAAc,EAClB,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,uBAAuB,CAAC,oBAAoB,CAAC,EAC3D,eAAe,EAAE,mCAAmC,GAAG,SAAS,GAAG,IAAI,EACvE,qBAAqB,EAAE,mCAAmC,GAA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EAAE,mCAAmC,GAAG,SAAS,GAAG,IAAI,GACzE,KAAK,EAAE,CAgCT;AAuCD,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,CAgBhF"}
@@ -1,7 +1,7 @@
1
1
  // (C) 2007-2026 GoodData Corporation
2
2
  import { compact, isEmpty, range } from "lodash-es";
3
3
  import { BucketNames } from "@gooddata/sdk-ui";
4
- import { isBarChart, isBubbleChart, isHeatmap, isOneOfTypes, isScatterPlot, isSupportingJoinedAttributeAxisName, unwrap, } from "../_util/common.js";
4
+ import { isBarChart, isBubbleChart, isComboChart, isHeatmap, isLineChart, isOneOfTypes, isScatterPlot, isSupportingJoinedAttributeAxisName, unwrap, } from "../_util/common.js";
5
5
  import { supportedDualAxesChartTypes } from "./chartCapabilities.js";
6
6
  function preprocessMeasureGroupItems(measureGroup, defaultValues) {
7
7
  return measureGroup.items.map((item, index) => {
@@ -99,14 +99,38 @@ function getDualAxesYAxes(secondaryAxisMeasures, measureGroup) {
99
99
  const secondAxis = addSeriesIndicesToAxis(createYAxisItem(measuresInSecondAxis, true), measuresInSecondAxis);
100
100
  return compact([firstAxis, secondAxis]);
101
101
  }
102
- function getDefaultYAxes(measureGroupItems, firstMeasureGroupItem) {
103
- // if more than one measure and NOT dual, then have empty item name
104
- const hasMoreThanOneMeasure = measureGroupItems.length > 1;
105
- const nonDualMeasureAxis = hasMoreThanOneMeasure ? { label: "" } : {};
102
+ // Control (threshold) measures style the regular measures (e.g. dashed line segments) instead of being
103
+ // drawn on their own, so they must not count as plotted measures. Only relevant for line/combo with the
104
+ // feature flag on - mirrors the gating in `isThresholdSetupValid` (chartThresholds.ts).
105
+ function getThresholdMeasureLocalIds(config) {
106
+ const isThresholdCapableChart = isLineChart(config.type) || isComboChart(config.type);
107
+ const applies = config.enableLineChartTrendThreshold && isThresholdCapableChart;
108
+ return new Set(applies ? (config.thresholdMeasures ?? []) : []);
109
+ }
110
+ // The title is shown only when a single regular (non-control) measure is plotted; otherwise the axis
111
+ // would mix metrics and stays unnamed.
112
+ function getDefaultYAxisLabel(config, measureGroup, measureGroupItems) {
113
+ const thresholdMeasureLocalIds = getThresholdMeasureLocalIds(config);
114
+ // Indices of the regular (non-control) measures; aligned 1:1 with measureGroupItems.
115
+ const visibleMeasureIndices = measureGroup.items.reduce((indices, item, index) => {
116
+ if (!thresholdMeasureLocalIds.has(unwrap(item).localIdentifier)) {
117
+ indices.push(index);
118
+ }
119
+ return indices;
120
+ }, []);
121
+ if (visibleMeasureIndices.length === 1) {
122
+ // yLabel override wins, else the surviving measure's name (which may not be the first in the bucket).
123
+ return config.yLabel || measureGroupItems[visibleMeasureIndices[0]].label;
124
+ }
125
+ return "";
126
+ }
127
+ // Dual-axis charts go through createYAxisItem and are intentionally left unchanged.
128
+ function getDefaultYAxes(config, measureGroup, measureGroupItems, firstMeasureGroupItem) {
106
129
  return [
107
130
  {
131
+ // Keep the first measure's metadata (e.g. format) and only override the title text.
108
132
  ...firstMeasureGroupItem,
109
- ...nonDualMeasureAxis,
133
+ label: getDefaultYAxisLabel(config, measureGroup, measureGroupItems),
110
134
  seriesIndices: range(measureGroupItems.length),
111
135
  },
112
136
  ];
@@ -132,7 +156,7 @@ export function getYAxes(dv, config, measureGroup, stackByAttribute) {
132
156
  if (isDualAxes) {
133
157
  return getDualAxesYAxes(secondaryAxisMeasures, measureGroup);
134
158
  }
135
- return getDefaultYAxes(measureGroupItems, firstMeasureGroupItem);
159
+ return getDefaultYAxes(config, measureGroup, measureGroupItems, firstMeasureGroupItem);
136
160
  }
137
161
  function assignMeasuresToAxes(secondMeasures, measureGroup) {
138
162
  return measureGroup.items.reduce((result, { measureHeaderItem: { name, format, localIdentifier } }, index) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-charts",
3
- "version": "11.43.0-alpha.1",
3
+ "version": "11.43.0-alpha.2",
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.43.0-alpha.1",
73
- "@gooddata/sdk-model": "11.43.0-alpha.1",
74
- "@gooddata/sdk-ui": "11.43.0-alpha.1",
75
- "@gooddata/sdk-ui-kit": "11.43.0-alpha.1",
76
- "@gooddata/sdk-ui-theme-provider": "11.43.0-alpha.1",
77
- "@gooddata/sdk-ui-vis-commons": "11.43.0-alpha.1",
78
- "@gooddata/util": "11.43.0-alpha.1"
72
+ "@gooddata/sdk-backend-spi": "11.43.0-alpha.2",
73
+ "@gooddata/sdk-model": "11.43.0-alpha.2",
74
+ "@gooddata/sdk-ui": "11.43.0-alpha.2",
75
+ "@gooddata/sdk-ui-theme-provider": "11.43.0-alpha.2",
76
+ "@gooddata/sdk-ui-kit": "11.43.0-alpha.2",
77
+ "@gooddata/sdk-ui-vis-commons": "11.43.0-alpha.2",
78
+ "@gooddata/util": "11.43.0-alpha.2"
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.43.0-alpha.1",
124
- "@gooddata/oxlint-config": "11.43.0-alpha.1",
125
- "@gooddata/reference-workspace": "11.43.0-alpha.1",
126
- "@gooddata/stylelint-config": "11.43.0-alpha.1",
127
- "@gooddata/sdk-backend-mockingbird": "11.43.0-alpha.1"
123
+ "@gooddata/eslint-config": "11.43.0-alpha.2",
124
+ "@gooddata/oxlint-config": "11.43.0-alpha.2",
125
+ "@gooddata/sdk-backend-mockingbird": "11.43.0-alpha.2",
126
+ "@gooddata/stylelint-config": "11.43.0-alpha.2",
127
+ "@gooddata/reference-workspace": "11.43.0-alpha.2"
128
128
  },
129
129
  "peerDependencies": {
130
130
  "react": "^18.0.0 || ^19.0.0",