@gooddata/sdk-ui-charts 11.41.0-alpha.1 → 11.41.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.
|
@@ -32,13 +32,11 @@ function ChartTransformationImpl({ config, renderer = renderHighCharts, dataView
|
|
|
32
32
|
const chartOptions = getChartOptions(dataView, config, drillablePredicates, emptyHeaderTitleFromIntl(intl), theme, totalColumnTitleFromIntl(intl), clusterTitleFromIntl(intl), anomaliesTitleFromIntl(intl));
|
|
33
33
|
if (config.customTooltip?.enabled) {
|
|
34
34
|
customTooltipRuntimeRef.current.identifierMapping = buildIdentifierMapping(dataView.definition, config.type);
|
|
35
|
-
customTooltipRuntimeRef.current.tooltipLookup = tooltipLookup
|
|
36
|
-
customTooltipRuntimeRef.current.erroredRefs = tooltipLookup?.erroredRefs;
|
|
35
|
+
customTooltipRuntimeRef.current.tooltipLookup = tooltipLookup;
|
|
37
36
|
}
|
|
38
37
|
else {
|
|
39
38
|
customTooltipRuntimeRef.current.identifierMapping = undefined;
|
|
40
39
|
customTooltipRuntimeRef.current.tooltipLookup = undefined;
|
|
41
|
-
customTooltipRuntimeRef.current.erroredRefs = undefined;
|
|
42
40
|
}
|
|
43
41
|
chartOptions.customTooltipRuntime = customTooltipRuntimeRef.current;
|
|
44
42
|
const legendOptions = buildLegendOptions(config.legend, chartOptions, theme, intl);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Assembles the custom-tooltip section / separator HTML for a hovered Highcharts
|
|
3
|
-
* point: external values from the precomputed lookup
|
|
4
|
-
*
|
|
5
|
-
* Lives in the customTooltip module rather than the general
|
|
3
|
+
* point: external values from the precomputed lookup, merged with in-chart values
|
|
4
|
+
* from the point's drill intersection. A reference absent from the lookup renders
|
|
5
|
+
* as unretrievable. Lives in the customTooltip module rather than the general
|
|
6
|
+
* chart-config file.
|
|
6
7
|
*/
|
|
7
8
|
import { type ITooltipLocalizedStrings } from "@gooddata/sdk-ui-vis-commons";
|
|
8
9
|
import { type IChartConfig } from "../../../../interfaces/chartConfig.js";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
/**
|
|
3
3
|
* Assembles the custom-tooltip section / separator HTML for a hovered Highcharts
|
|
4
|
-
* point: external values from the precomputed lookup
|
|
5
|
-
*
|
|
6
|
-
* Lives in the customTooltip module rather than the general
|
|
4
|
+
* point: external values from the precomputed lookup, merged with in-chart values
|
|
5
|
+
* from the point's drill intersection. A reference absent from the lookup renders
|
|
6
|
+
* as unretrievable. Lives in the customTooltip module rather than the general
|
|
7
|
+
* chart-config file.
|
|
7
8
|
*/
|
|
8
|
-
import { composeCustomTooltipSectionHtml
|
|
9
|
+
import { composeCustomTooltipSectionHtml } from "@gooddata/sdk-ui-vis-commons";
|
|
9
10
|
import { resolveReferencesFromPoint } from "./referenceResolver.js";
|
|
10
11
|
import { buildPointKey } from "./tooltipLookup.js";
|
|
11
12
|
/**
|
|
@@ -16,15 +17,10 @@ export function getCustomTooltipSection(point, localizedStrings, chartConfig, cu
|
|
|
16
17
|
if (!customTooltip?.enabled || !customTooltip.content) {
|
|
17
18
|
return "";
|
|
18
19
|
}
|
|
19
|
-
// External values from the lookup
|
|
20
|
+
// External values from the precomputed lookup (refs not in the chart).
|
|
20
21
|
const intersection = point.drillIntersection ?? [];
|
|
21
22
|
const pointKey = buildPointKey(intersection);
|
|
22
|
-
const externalValues = {
|
|
23
|
-
...(customTooltipRuntime?.tooltipLookup?.get(pointKey) ?? {}),
|
|
24
|
-
};
|
|
25
|
-
for (const key of customTooltipRuntime?.erroredRefs ?? []) {
|
|
26
|
-
externalValues[key] = { kind: "error" };
|
|
27
|
-
}
|
|
23
|
+
const externalValues = customTooltipRuntime?.tooltipLookup?.get(pointKey) ?? {};
|
|
28
24
|
// In-chart values from the hovered point's drill intersection.
|
|
29
25
|
const pointLocal = resolveReferencesFromPoint(point, chartConfig?.separators, customTooltipRuntime?.identifierMapping);
|
|
30
26
|
return composeCustomTooltipSectionHtml(customTooltip.content, pointLocal, externalValues, localizedStrings);
|
|
@@ -155,7 +155,6 @@ export interface IChartOptions {
|
|
|
155
155
|
export interface ICustomTooltipRuntime {
|
|
156
156
|
identifierMapping?: IIdentifierMapping;
|
|
157
157
|
tooltipLookup?: Map<string, IResolvedReferenceValues>;
|
|
158
|
-
erroredRefs?: ReadonlySet<string>;
|
|
159
158
|
}
|
|
160
159
|
export interface IPatternOptionsObject {
|
|
161
160
|
path: SVGAttributes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-charts",
|
|
3
|
-
"version": "11.41.0-alpha.
|
|
3
|
+
"version": "11.41.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.0",
|
|
72
|
-
"@gooddata/sdk-backend-spi": "11.41.0-alpha.
|
|
73
|
-
"@gooddata/sdk-
|
|
74
|
-
"@gooddata/sdk-
|
|
75
|
-
"@gooddata/sdk-ui-
|
|
76
|
-
"@gooddata/sdk-ui-
|
|
77
|
-
"@gooddata/sdk-ui-vis-commons": "11.41.0-alpha.
|
|
78
|
-
"@gooddata/util": "11.41.0-alpha.
|
|
72
|
+
"@gooddata/sdk-backend-spi": "11.41.0-alpha.2",
|
|
73
|
+
"@gooddata/sdk-model": "11.41.0-alpha.2",
|
|
74
|
+
"@gooddata/sdk-ui": "11.41.0-alpha.2",
|
|
75
|
+
"@gooddata/sdk-ui-theme-provider": "11.41.0-alpha.2",
|
|
76
|
+
"@gooddata/sdk-ui-kit": "11.41.0-alpha.2",
|
|
77
|
+
"@gooddata/sdk-ui-vis-commons": "11.41.0-alpha.2",
|
|
78
|
+
"@gooddata/util": "11.41.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.41.0-alpha.
|
|
124
|
-
"@gooddata/oxlint-config": "11.41.0-alpha.
|
|
125
|
-
"@gooddata/reference-workspace": "11.41.0-alpha.
|
|
126
|
-
"@gooddata/
|
|
127
|
-
"@gooddata/
|
|
123
|
+
"@gooddata/eslint-config": "11.41.0-alpha.2",
|
|
124
|
+
"@gooddata/oxlint-config": "11.41.0-alpha.2",
|
|
125
|
+
"@gooddata/reference-workspace": "11.41.0-alpha.2",
|
|
126
|
+
"@gooddata/stylelint-config": "11.41.0-alpha.2",
|
|
127
|
+
"@gooddata/sdk-backend-mockingbird": "11.41.0-alpha.2"
|
|
128
128
|
},
|
|
129
129
|
"peerDependencies": {
|
|
130
130
|
"react": "^18.0.0 || ^19.0.0",
|