@gooddata/sdk-ui-ext 11.36.0-alpha.3 → 11.36.0-alpha.6
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 +63 -115
- package/esm/internal/assets/radar/bucket-title-measures.svg +1 -0
- package/esm/internal/assets/radar/bucket-title-segment.svg +1 -0
- package/esm/internal/assets/radar/bucket-title-trend.svg +1 -0
- package/esm/internal/components/VisualizationCatalog.js +2 -0
- package/esm/internal/components/configurationControls/RadarGridLineShapeControl.d.ts +8 -0
- package/esm/internal/components/configurationControls/RadarGridLineShapeControl.js +13 -0
- package/esm/internal/components/configurationControls/RadarRenderAsControl.d.ts +8 -0
- package/esm/internal/components/configurationControls/RadarRenderAsControl.js +13 -0
- package/esm/internal/components/configurationControls/colors/ColorsSection.d.ts +4 -1
- package/esm/internal/components/configurationControls/colors/ColorsSection.js +2 -3
- package/esm/internal/components/configurationPanels/RadarChartConfigurationPanel.d.ts +11 -0
- package/esm/internal/components/configurationPanels/RadarChartConfigurationPanel.js +58 -0
- package/esm/internal/components/pluggableVisualizations/PluggableColumnBarCharts.js +1 -3
- package/esm/internal/components/pluggableVisualizations/alerts.js +2 -1
- package/esm/internal/components/pluggableVisualizations/areaChart/PluggableAreaChart.js +2 -4
- package/esm/internal/components/pluggableVisualizations/baseChart/PluggableBaseChart.d.ts +0 -8
- package/esm/internal/components/pluggableVisualizations/baseChart/PluggableBaseChart.js +3 -17
- package/esm/internal/components/pluggableVisualizations/bubbleChart/PluggableBubbleChart.js +1 -2
- package/esm/internal/components/pluggableVisualizations/bulletChart/PluggableBulletChart.js +2 -4
- package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChart.js +1 -2
- package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChartDeprecated.js +1 -1
- package/esm/internal/components/pluggableVisualizations/drillDownUtil.js +1 -0
- package/esm/internal/components/pluggableVisualizations/geoAreaChart/PluggableGeoAreaChart.js +1 -2
- package/esm/internal/components/pluggableVisualizations/geoChart/PluggableGeoPushpinChart.js +1 -3
- package/esm/internal/components/pluggableVisualizations/geoChartNext/PluggableGeoPushpinChartNext.js +1 -3
- package/esm/internal/components/pluggableVisualizations/headline/PluggableHeadline.js +3 -3
- package/esm/internal/components/pluggableVisualizations/heatMap/PluggableHeatmap.js +1 -2
- package/esm/internal/components/pluggableVisualizations/lineChart/PluggableLineChart.js +2 -4
- package/esm/internal/components/pluggableVisualizations/pieChart/PluggablePieChart.js +1 -2
- package/esm/internal/components/pluggableVisualizations/pivotTable/PluggablePivotTable.js +2 -2
- package/esm/internal/components/pluggableVisualizations/pivotTableNext/PluggablePivotTableNext.js +2 -2
- package/esm/internal/components/pluggableVisualizations/radarChart/PluggableRadarChart.d.ts +49 -0
- package/esm/internal/components/pluggableVisualizations/radarChart/PluggableRadarChart.js +180 -0
- package/esm/internal/components/pluggableVisualizations/radarChart/RadarChartDescriptor.d.ts +11 -0
- package/esm/internal/components/pluggableVisualizations/radarChart/RadarChartDescriptor.js +47 -0
- package/esm/internal/components/pluggableVisualizations/repeater/PluggableRepeater.js +1 -5
- package/esm/internal/components/pluggableVisualizations/sankeyChart/PluggableSankeyChart.js +1 -2
- package/esm/internal/components/pluggableVisualizations/scatterPlot/PluggableScatterPlot.js +1 -2
- package/esm/internal/components/pluggableVisualizations/treeMap/PluggableTreemap.js +2 -4
- package/esm/internal/components/pluggableVisualizations/waterfallChart/PluggableWaterfallChart.js +2 -4
- package/esm/internal/components/pluggableVisualizations/xirr/PluggableXirr.js +1 -1
- package/esm/internal/constants/dropdowns.d.ts +2 -0
- package/esm/internal/constants/dropdowns.js +8 -0
- package/esm/internal/constants/supportedProperties.d.ts +1 -0
- package/esm/internal/constants/supportedProperties.js +14 -0
- package/esm/internal/constants/uiConfig.d.ts +1 -12
- package/esm/internal/constants/uiConfig.js +25 -12
- package/esm/internal/translations/en-US.localization-bundle.d.ts +52 -0
- package/esm/internal/translations/en-US.localization-bundle.js +52 -0
- package/esm/internal/utils/bucketHelper.d.ts +1 -1
- package/esm/internal/utils/bucketHelper.js +8 -11
- package/esm/internal/utils/dimensions.js +2 -1
- package/esm/internal/utils/filters/sanitizeGeoReferencePointFilters.d.ts +1 -1
- package/esm/internal/utils/filters/sanitizeGeoReferencePointFilters.js +7 -19
- package/esm/internal/utils/uiConfigHelpers/headlineUiConfigHelper.d.ts +2 -2
- package/esm/internal/utils/uiConfigHelpers/headlineUiConfigHelper.js +4 -7
- package/esm/internal/utils/uiConfigHelpers/pivotTableNextUiConfigHelper.d.ts +1 -1
- package/esm/internal/utils/uiConfigHelpers/pivotTableNextUiConfigHelper.js +4 -4
- package/esm/internal/utils/uiConfigHelpers/pivotTableUiConfigHelper.d.ts +1 -1
- package/esm/internal/utils/uiConfigHelpers/pivotTableUiConfigHelper.js +4 -4
- package/esm/internal/utils/uiConfigHelpers/radarChartUiConfigHelper.d.ts +3 -0
- package/esm/internal/utils/uiConfigHelpers/radarChartUiConfigHelper.js +58 -0
- package/esm/internal/utils/visualizationsHelper.js +1 -1
- package/esm/locales.d.ts +30 -0
- package/esm/locales.js +13 -0
- package/package.json +21 -21
|
@@ -96,9 +96,7 @@ export class PluggableTreemap extends PluggableBaseChart {
|
|
|
96
96
|
const buckets = referencePoint?.buckets;
|
|
97
97
|
const nonStackAttributes = getAttributeItemsWithoutStacks(buckets, [ATTRIBUTE, DATE]);
|
|
98
98
|
const measures = getMeasureItems(buckets);
|
|
99
|
-
|
|
100
|
-
this.addMetricToFiltersIfEnabled(uiConfig);
|
|
101
|
-
return uiConfig;
|
|
99
|
+
return getTreemapUiConfig(nonStackAttributes.length > 0, measures.length > 1);
|
|
102
100
|
}
|
|
103
101
|
getExtendedReferencePoint(referencePoint) {
|
|
104
102
|
const clonedReferencePoint = cloneDeep(referencePoint);
|
|
@@ -118,7 +116,7 @@ export class PluggableTreemap extends PluggableBaseChart {
|
|
|
118
116
|
newReferencePoint = set(newReferencePoint, "properties.controls.chartFill", { type: "solid" });
|
|
119
117
|
}
|
|
120
118
|
newReferencePoint = removeSort(newReferencePoint);
|
|
121
|
-
return Promise.resolve(sanitizeFilters(newReferencePoint,
|
|
119
|
+
return Promise.resolve(sanitizeFilters(newReferencePoint, referencePoint));
|
|
122
120
|
}
|
|
123
121
|
addFilters(source, drillConfig, event, backendSupportsElementUris) {
|
|
124
122
|
const cutIntersection = reverseAndTrimIntersection(drillConfig, event.drillContext.intersection);
|
package/esm/internal/components/pluggableVisualizations/waterfallChart/PluggableWaterfallChart.js
CHANGED
|
@@ -76,9 +76,7 @@ export class PluggableWaterfallChart extends PluggableBaseChart {
|
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
getUiConfig() {
|
|
79
|
-
|
|
80
|
-
this.addMetricToFiltersIfEnabled(config);
|
|
81
|
-
return config;
|
|
79
|
+
return cloneDeep(DEFAULT_WATERFALL_UICONFIG);
|
|
82
80
|
}
|
|
83
81
|
getExtendedReferencePoint(referencePoint) {
|
|
84
82
|
const clonedReferencePoint = cloneDeep(referencePoint);
|
|
@@ -129,7 +127,7 @@ export class PluggableWaterfallChart extends PluggableBaseChart {
|
|
|
129
127
|
newReferencePoint = getReferencePointWithSupportedProperties(newReferencePoint, this.supportedPropertiesList);
|
|
130
128
|
newReferencePoint = this.setPropertiesTotalMeasures(newReferencePoint);
|
|
131
129
|
newReferencePoint = setWaterfallChartUiConfig(newReferencePoint, this.intl, this.type);
|
|
132
|
-
return Promise.resolve(sanitizeFilters(newReferencePoint,
|
|
130
|
+
return Promise.resolve(sanitizeFilters(newReferencePoint, referencePoint));
|
|
133
131
|
}
|
|
134
132
|
getDefaultAndAvailableSort(measures, viewBy) {
|
|
135
133
|
if (isEmpty(measures) || isEmpty(viewBy)) {
|
|
@@ -65,7 +65,7 @@ export class PluggableXirr extends AbstractPluggableVisualization {
|
|
|
65
65
|
newReferencePoint.uiConfig = getXirrUiConfig(newReferencePoint, this.intl);
|
|
66
66
|
newReferencePoint = removeSort(newReferencePoint);
|
|
67
67
|
newReferencePoint = getReferencePointWithSupportedProperties(newReferencePoint, this.supportedPropertiesList);
|
|
68
|
-
return Promise.resolve(sanitizeFilters(newReferencePoint,
|
|
68
|
+
return Promise.resolve(sanitizeFilters(newReferencePoint, referencePointCloned));
|
|
69
69
|
};
|
|
70
70
|
getExecution(options, insight, executionFactory) {
|
|
71
71
|
const { dateFormat } = options;
|
|
@@ -26,3 +26,5 @@ export declare const grandTotalsPositionDropdownItems: IDropdownItem[];
|
|
|
26
26
|
export declare const calculationDropdownItems: IDropdownItem[];
|
|
27
27
|
export declare const comparisonPositionDropdownItems: IDropdownItem[];
|
|
28
28
|
export declare const fillDropdownItems: IDropdownItem[];
|
|
29
|
+
export declare const radarRenderAsDropdownItems: IDropdownItem[];
|
|
30
|
+
export declare const radarGridLineShapeDropdownItems: IDropdownItem[];
|
|
@@ -243,3 +243,11 @@ export const fillDropdownItems = [
|
|
|
243
243
|
{ title: messages["fillPattern"].id, value: "pattern" },
|
|
244
244
|
{ title: messages["fillOutline"].id, value: "outline" },
|
|
245
245
|
];
|
|
246
|
+
export const radarRenderAsDropdownItems = [
|
|
247
|
+
{ title: messages["radarRenderAsFilled"].id, value: "filled" },
|
|
248
|
+
{ title: messages["radarRenderAsOutline"].id, value: "outline" },
|
|
249
|
+
];
|
|
250
|
+
export const radarGridLineShapeDropdownItems = [
|
|
251
|
+
{ title: messages["radarGridLineShapePolygon"].id, value: "polygon" },
|
|
252
|
+
{ title: messages["radarGridLineShapeCircle"].id, value: "circle" },
|
|
253
|
+
];
|
|
@@ -8,6 +8,7 @@ export declare const COLUMN_CHART_SUPPORTED_PROPERTIES: {
|
|
|
8
8
|
export declare const LINE_CHART_SUPPORTED_PROPERTIES: {
|
|
9
9
|
[x: string]: string[];
|
|
10
10
|
};
|
|
11
|
+
export declare const RADAR_CHART_SUPPORTED_PROPERTIES: string[];
|
|
11
12
|
export declare const BAR_CHART_SUPPORTED_PROPERTIES: {
|
|
12
13
|
[x: string]: string[];
|
|
13
14
|
};
|
|
@@ -123,6 +123,20 @@ export const LINE_CHART_SUPPORTED_PROPERTIES = {
|
|
|
123
123
|
"thresholdExcludedMeasures",
|
|
124
124
|
],
|
|
125
125
|
};
|
|
126
|
+
export const RADAR_CHART_SUPPORTED_PROPERTIES = [
|
|
127
|
+
...BASE_PROPERTIES,
|
|
128
|
+
...ANOMALIES_PROPERTIES,
|
|
129
|
+
...BASE_X_AXIS_PROPERTIES,
|
|
130
|
+
...BASE_Y_AXIS_PROPERTIES,
|
|
131
|
+
"yaxis.min",
|
|
132
|
+
"yaxis.max",
|
|
133
|
+
"dataPoints.visible",
|
|
134
|
+
"distinctPointShapes",
|
|
135
|
+
"chartFill",
|
|
136
|
+
"continuousLine.enabled",
|
|
137
|
+
"radarRenderAs",
|
|
138
|
+
"radarGridLineShape",
|
|
139
|
+
];
|
|
126
140
|
export const BAR_CHART_SUPPORTED_PROPERTIES = {
|
|
127
141
|
[AXIS.PRIMARY]: [
|
|
128
142
|
...BASE_PROPERTIES,
|
|
@@ -52,18 +52,6 @@ export declare const defaultFilters: {
|
|
|
52
52
|
isShowInPercentEnabled: boolean;
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
|
-
export declare const defaultImprovedFilters: {
|
|
56
|
-
filters: {
|
|
57
|
-
accepts: string[];
|
|
58
|
-
itemsLimit: number;
|
|
59
|
-
itemsLimitByType: {
|
|
60
|
-
date: number;
|
|
61
|
-
};
|
|
62
|
-
allowsReordering: boolean;
|
|
63
|
-
enabled: boolean;
|
|
64
|
-
isShowInPercentEnabled: boolean;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
55
|
export declare const disabledOpenAsReportConfig: {
|
|
68
56
|
openAsReport: {
|
|
69
57
|
supported: boolean;
|
|
@@ -77,6 +65,7 @@ export declare const COLUMN_BAR_CHART_UICONFIG: IUiConfig;
|
|
|
77
65
|
export declare const COLUMN_BAR_CHART_UICONFIG_WITH_MULTIPLE_DATES: IUiConfig;
|
|
78
66
|
export declare const DEFAULT_LINE_UICONFIG: IUiConfig;
|
|
79
67
|
export declare const LINE_UICONFIG_WITH_MULTIPLE_DATES: IUiConfig;
|
|
68
|
+
export declare const RADAR_UICONFIG: IUiConfig;
|
|
80
69
|
export declare const DEFAULT_AREA_UICONFIG: IUiConfig;
|
|
81
70
|
export declare const AREA_UICONFIG_WITH_MULTIPLE_DATES: IUiConfig;
|
|
82
71
|
export declare const DEFAULT_PIE_UICONFIG: IUiConfig;
|
|
@@ -57,18 +57,6 @@ const stackBaseWithDate = {
|
|
|
57
57
|
accepts: [ATTRIBUTE, DATE],
|
|
58
58
|
};
|
|
59
59
|
export const defaultFilters = {
|
|
60
|
-
filters: {
|
|
61
|
-
accepts: [ATTRIBUTE, DATE],
|
|
62
|
-
itemsLimit: MAX_FILTERS_COUNT,
|
|
63
|
-
itemsLimitByType: {
|
|
64
|
-
date: 1,
|
|
65
|
-
},
|
|
66
|
-
allowsReordering: false,
|
|
67
|
-
enabled: true,
|
|
68
|
-
isShowInPercentEnabled: false,
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
export const defaultImprovedFilters = {
|
|
72
60
|
filters: {
|
|
73
61
|
accepts: [ATTRIBUTE, METRIC, DATE],
|
|
74
62
|
itemsLimit: MAX_FILTERS_COUNT,
|
|
@@ -281,6 +269,31 @@ export const LINE_UICONFIG_WITH_MULTIPLE_DATES = {
|
|
|
281
269
|
OverTimeComparisonTypes.PREVIOUS_PERIOD,
|
|
282
270
|
],
|
|
283
271
|
};
|
|
272
|
+
export const RADAR_UICONFIG = {
|
|
273
|
+
buckets: {
|
|
274
|
+
measures: {
|
|
275
|
+
...measuresBase,
|
|
276
|
+
},
|
|
277
|
+
trend: {
|
|
278
|
+
...viewBase,
|
|
279
|
+
allowsDuplicateDates: true,
|
|
280
|
+
},
|
|
281
|
+
segment: {
|
|
282
|
+
...stackBaseWithDate,
|
|
283
|
+
itemsLimitByType: {
|
|
284
|
+
date: 1,
|
|
285
|
+
},
|
|
286
|
+
allowsDuplicateDates: true,
|
|
287
|
+
},
|
|
288
|
+
...defaultFilters,
|
|
289
|
+
},
|
|
290
|
+
...defaultRootUiConfigProperties,
|
|
291
|
+
...enabledOpenAsReportConfig,
|
|
292
|
+
supportedOverTimeComparisonTypes: [
|
|
293
|
+
OverTimeComparisonTypes.SAME_PERIOD_PREVIOUS_YEAR,
|
|
294
|
+
OverTimeComparisonTypes.PREVIOUS_PERIOD,
|
|
295
|
+
],
|
|
296
|
+
};
|
|
284
297
|
export const DEFAULT_AREA_UICONFIG = {
|
|
285
298
|
buckets: {
|
|
286
299
|
measures: {
|
|
@@ -283,6 +283,18 @@ export declare const en_US: {
|
|
|
283
283
|
text: string;
|
|
284
284
|
crowdinContext: string;
|
|
285
285
|
};
|
|
286
|
+
"dashboard.bucket.measures_title.radar": {
|
|
287
|
+
text: string;
|
|
288
|
+
crowdinContext: string;
|
|
289
|
+
};
|
|
290
|
+
"dashboard.bucket.trend_title.radar": {
|
|
291
|
+
text: string;
|
|
292
|
+
crowdinContext: string;
|
|
293
|
+
};
|
|
294
|
+
"dashboard.bucket.segment_title.radar": {
|
|
295
|
+
text: string;
|
|
296
|
+
crowdinContext: string;
|
|
297
|
+
};
|
|
286
298
|
"dashboard.bucket.segment_title.treemap": {
|
|
287
299
|
text: string;
|
|
288
300
|
crowdinContext: string;
|
|
@@ -879,6 +891,46 @@ export declare const en_US: {
|
|
|
879
891
|
text: string;
|
|
880
892
|
crowdinContext: string;
|
|
881
893
|
};
|
|
894
|
+
"properties.radar.grid.title": {
|
|
895
|
+
text: string;
|
|
896
|
+
crowdinContext: string;
|
|
897
|
+
};
|
|
898
|
+
"properties.radar.gridLineShape.label": {
|
|
899
|
+
text: string;
|
|
900
|
+
crowdinContext: string;
|
|
901
|
+
};
|
|
902
|
+
"properties.radar.gridLineShape.polygon": {
|
|
903
|
+
text: string;
|
|
904
|
+
crowdinContext: string;
|
|
905
|
+
};
|
|
906
|
+
"properties.radar.gridLineShape.circle": {
|
|
907
|
+
text: string;
|
|
908
|
+
crowdinContext: string;
|
|
909
|
+
};
|
|
910
|
+
"properties.radar.renderAs.label": {
|
|
911
|
+
text: string;
|
|
912
|
+
crowdinContext: string;
|
|
913
|
+
};
|
|
914
|
+
"properties.radar.renderAs.filled": {
|
|
915
|
+
text: string;
|
|
916
|
+
crowdinContext: string;
|
|
917
|
+
};
|
|
918
|
+
"properties.radar.renderAs.outline": {
|
|
919
|
+
text: string;
|
|
920
|
+
crowdinContext: string;
|
|
921
|
+
};
|
|
922
|
+
"properties.radar.labels.title": {
|
|
923
|
+
text: string;
|
|
924
|
+
crowdinContext: string;
|
|
925
|
+
};
|
|
926
|
+
"properties.radar.spokeLabels": {
|
|
927
|
+
text: string;
|
|
928
|
+
crowdinContext: string;
|
|
929
|
+
};
|
|
930
|
+
"properties.radar.radialLabels": {
|
|
931
|
+
text: string;
|
|
932
|
+
crowdinContext: string;
|
|
933
|
+
};
|
|
882
934
|
"properties.points.title": {
|
|
883
935
|
text: string;
|
|
884
936
|
crowdinContext: string;
|
|
@@ -285,6 +285,18 @@ export const en_US = {
|
|
|
285
285
|
"text": "Segment by",
|
|
286
286
|
"crowdinContext": "Label for a categorical field used to divide data into segments or categories (e.g., Product Type, Customer Status)"
|
|
287
287
|
},
|
|
288
|
+
"dashboard.bucket.measures_title.radar": {
|
|
289
|
+
"text": "Metrics",
|
|
290
|
+
"crowdinContext": "Label for calculated indicators based on metric data that show performance in a radar chart (e.g., Revenue Growth, Profit Margin)"
|
|
291
|
+
},
|
|
292
|
+
"dashboard.bucket.trend_title.radar": {
|
|
293
|
+
"text": "View by",
|
|
294
|
+
"crowdinContext": "Label for a categorical attribute field that defines the radar chart spokes/axes (e.g., Product Category, Region). Dates are not supported in this bucket."
|
|
295
|
+
},
|
|
296
|
+
"dashboard.bucket.segment_title.radar": {
|
|
297
|
+
"text": "Segment by",
|
|
298
|
+
"crowdinContext": "Label for a categorical field used to create multiple polygons in a radar chart (e.g., Customer Segment, Time Period)"
|
|
299
|
+
},
|
|
288
300
|
"dashboard.bucket.segment_title.treemap": {
|
|
289
301
|
"text": "Segment by",
|
|
290
302
|
"crowdinContext": "Label for a categorical field used to divide data into segments or categories (e.g., Product Type, Customer Status)"
|
|
@@ -881,6 +893,46 @@ export const en_US = {
|
|
|
881
893
|
"text": "Vertical",
|
|
882
894
|
"crowdinContext": "The chart orientation configuration"
|
|
883
895
|
},
|
|
896
|
+
"properties.radar.grid.title": {
|
|
897
|
+
"text": "Grid",
|
|
898
|
+
"crowdinContext": "Section title for the radar chart grid configuration (axes and gridlines)"
|
|
899
|
+
},
|
|
900
|
+
"properties.radar.gridLineShape.label": {
|
|
901
|
+
"text": "Gridlines shape",
|
|
902
|
+
"crowdinContext": "Label for the radar chart gridlines shape option"
|
|
903
|
+
},
|
|
904
|
+
"properties.radar.gridLineShape.polygon": {
|
|
905
|
+
"text": "Spiderweb",
|
|
906
|
+
"crowdinContext": "Radar chart gridlines rendered as a polygon/spider web shape"
|
|
907
|
+
},
|
|
908
|
+
"properties.radar.gridLineShape.circle": {
|
|
909
|
+
"text": "Circle",
|
|
910
|
+
"crowdinContext": "Radar chart gridlines rendered as concentric circles"
|
|
911
|
+
},
|
|
912
|
+
"properties.radar.renderAs.label": {
|
|
913
|
+
"text": "Render as",
|
|
914
|
+
"crowdinContext": "Label for the radar chart rendering style option"
|
|
915
|
+
},
|
|
916
|
+
"properties.radar.renderAs.filled": {
|
|
917
|
+
"text": "Filled",
|
|
918
|
+
"crowdinContext": "Radar chart rendered as filled polygons with semi-transparent color"
|
|
919
|
+
},
|
|
920
|
+
"properties.radar.renderAs.outline": {
|
|
921
|
+
"text": "Outline",
|
|
922
|
+
"crowdinContext": "Radar chart rendered as polygon outlines only, without fill"
|
|
923
|
+
},
|
|
924
|
+
"properties.radar.labels.title": {
|
|
925
|
+
"text": "Labels",
|
|
926
|
+
"crowdinContext": "Subsection header for label visibility controls in the radar chart Grid configuration panel"
|
|
927
|
+
},
|
|
928
|
+
"properties.radar.spokeLabels": {
|
|
929
|
+
"text": "Spoke labels",
|
|
930
|
+
"crowdinContext": "Toggle for showing/hiding labels on the radar chart spokes (category axis)"
|
|
931
|
+
},
|
|
932
|
+
"properties.radar.radialLabels": {
|
|
933
|
+
"text": "Radial labels",
|
|
934
|
+
"crowdinContext": "Toggle for showing/hiding labels on the radar chart radial axis (value axis)"
|
|
935
|
+
},
|
|
884
936
|
"properties.points.title": {
|
|
885
937
|
"text": "Points",
|
|
886
938
|
"crowdinContext": "Points on map"
|
|
@@ -8,7 +8,7 @@ export declare function isAttributeFilter(filter: IBucketFilter | undefined): fi
|
|
|
8
8
|
export declare function isMeasureValueFilter(filter: IBucketFilter | undefined): filter is IMeasureValueFilter;
|
|
9
9
|
export declare function isActiveMeasureValueFilter(filter: IBucketFilter): boolean;
|
|
10
10
|
export declare function isRankingFilter(filter: IBucketFilter | undefined): filter is IRankingFilter;
|
|
11
|
-
export declare function sanitizeFilters(newReferencePoint: IExtendedReferencePoint,
|
|
11
|
+
export declare function sanitizeFilters(newReferencePoint: IExtendedReferencePoint, oldReferencePoint: Pick<IExtendedReferencePoint, "buckets">): IExtendedReferencePoint;
|
|
12
12
|
export declare function isDerivedBucketItem(measureItem: IBucketItem): boolean;
|
|
13
13
|
export declare function isArithmeticBucketItem(bucketItem: IBucketItem): bucketItem is IBucketItem & {
|
|
14
14
|
operandLocalIdentifiers: string[];
|
|
@@ -119,16 +119,13 @@ function getMeasureValueFilterDimensionalityLocalIdsToTransform(filter, attribut
|
|
|
119
119
|
}
|
|
120
120
|
return localIdsToTransform;
|
|
121
121
|
}
|
|
122
|
-
function sanitizeMeasureValueFilter(filter, attributeBucketItems, measureBucketItems
|
|
123
|
-
if (attributeBucketItems.length === 0 && !enableImprovedAdFilters) {
|
|
124
|
-
return false;
|
|
125
|
-
}
|
|
122
|
+
function sanitizeMeasureValueFilter(filter, attributeBucketItems, measureBucketItems) {
|
|
126
123
|
// Validate dimensionality - each item based on its type
|
|
127
124
|
const hasValidDimensionality = !filter.dimensionality ||
|
|
128
125
|
filter.dimensionality.every((item) => {
|
|
129
126
|
if (isObjRef(item)) {
|
|
130
|
-
// ObjRef (catalog attribute)
|
|
131
|
-
return
|
|
127
|
+
// ObjRef (catalog attribute)
|
|
128
|
+
return true;
|
|
132
129
|
}
|
|
133
130
|
else {
|
|
134
131
|
// Local identifier - must exist in attribute bucket items
|
|
@@ -138,13 +135,13 @@ function sanitizeMeasureValueFilter(filter, attributeBucketItems, measureBucketI
|
|
|
138
135
|
if (!hasValidDimensionality) {
|
|
139
136
|
return false;
|
|
140
137
|
}
|
|
141
|
-
//
|
|
142
|
-
if (
|
|
138
|
+
// Allow measure filters even if measure is not in buckets
|
|
139
|
+
if (filter.measureRef !== undefined) {
|
|
143
140
|
return true;
|
|
144
141
|
}
|
|
145
142
|
return measureBucketItems.some((measureBucketItem) => measureBucketItem.localIdentifier === filter.measureLocalIdentifier);
|
|
146
143
|
}
|
|
147
|
-
export function sanitizeFilters(newReferencePoint,
|
|
144
|
+
export function sanitizeFilters(newReferencePoint, oldReferencePoint) {
|
|
148
145
|
const attributeBucketItems = getAllAttributeItems(newReferencePoint.buckets);
|
|
149
146
|
const oldAttributeBucketItems = getAllAttributeItems(oldReferencePoint.buckets);
|
|
150
147
|
const measureBucketItems = getAllMeasureItems(newReferencePoint.buckets);
|
|
@@ -156,7 +153,7 @@ export function sanitizeFilters(newReferencePoint, enableImprovedAdFilters = tru
|
|
|
156
153
|
// transformation
|
|
157
154
|
const transformedFilterItems = newReferencePoint.filters.items.map((filterBucketItem) => {
|
|
158
155
|
const filter = filterBucketItem.filters?.[0];
|
|
159
|
-
if (isMeasureValueFilter(filter)
|
|
156
|
+
if (isMeasureValueFilter(filter)) {
|
|
160
157
|
// Transform measure ref: migrate from localId to ref when measure is removed from buckets
|
|
161
158
|
const filterWithTransformedMeasure = transformMeasureValueFilterMeasureToRef(filter, measureBucketItems, oldMeasureBucketItems);
|
|
162
159
|
// Transform dimensionality
|
|
@@ -184,7 +181,7 @@ export function sanitizeFilters(newReferencePoint, enableImprovedAdFilters = tru
|
|
|
184
181
|
return attributeBucketItems.some((attributeBucketItem) => attributeBucketItem.attribute === filter.attribute);
|
|
185
182
|
}
|
|
186
183
|
else if (isMeasureValueFilter(filter)) {
|
|
187
|
-
return sanitizeMeasureValueFilter(filter, attributeBucketItems, measureBucketItems
|
|
184
|
+
return sanitizeMeasureValueFilter(filter, attributeBucketItems, measureBucketItems);
|
|
188
185
|
}
|
|
189
186
|
else if (isRankingFilter(filter)) {
|
|
190
187
|
if (attributeBucketItems.length === 0) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// (C) 2007-
|
|
1
|
+
// (C) 2007-2026 GoodData Corporation
|
|
2
2
|
import { compact } from "lodash-es";
|
|
3
3
|
import { MeasureGroupIdentifier, bucketAttributes, insightAttributes, insightBucket, insightBuckets, insightProperties, newDimension, newTwoDimensional, } from "@gooddata/sdk-model";
|
|
4
4
|
import { BucketNames, VisualizationTypes } from "@gooddata/sdk-ui";
|
|
@@ -97,6 +97,7 @@ export function generateDimensions(insight, type, customVisualizationConfig) {
|
|
|
97
97
|
case VisualizationTypes.TREEMAP:
|
|
98
98
|
return getTreemapDimensions(insight);
|
|
99
99
|
case VisualizationTypes.LINE:
|
|
100
|
+
case VisualizationTypes.RADAR:
|
|
100
101
|
return getLineDimensions(insight);
|
|
101
102
|
case VisualizationTypes.AREA:
|
|
102
103
|
return getAreaDimensions(insight);
|
|
@@ -11,4 +11,4 @@ import { type IBucketOfFun, type IFilters } from "../../interfaces/Visualization
|
|
|
11
11
|
* - converts dimensionality local ids to ObjRefs when possible (when improved filters are enabled)
|
|
12
12
|
* - drops MVFs that would stay invalid/dangling after the bucket change
|
|
13
13
|
*/
|
|
14
|
-
export declare function sanitizeGeoReferencePointFilters(filters: IFilters | undefined, oldBuckets: IBucketOfFun[], newBuckets: IBucketOfFun[]
|
|
14
|
+
export declare function sanitizeGeoReferencePointFilters(filters: IFilters | undefined, oldBuckets: IBucketOfFun[], newBuckets: IBucketOfFun[]): IFilters;
|
|
@@ -38,10 +38,7 @@ function transformMeasureValueFilterMeasureToRefIfPossible(filter, oldMeasureBuc
|
|
|
38
38
|
measureRef: idRef(previousMeasure.attribute, "measure"),
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function transformMeasureValueFilterDimensionalityToRefs(filter, oldRootAttributes, oldRootAttributeLocalIds, newRootAttributeLocalIds
|
|
42
|
-
if (!enableImprovedAdFilters) {
|
|
43
|
-
return filter;
|
|
44
|
-
}
|
|
41
|
+
function transformMeasureValueFilterDimensionalityToRefs(filter, oldRootAttributes, oldRootAttributeLocalIds, newRootAttributeLocalIds) {
|
|
45
42
|
if (!filter.dimensionality?.length) {
|
|
46
43
|
return filter;
|
|
47
44
|
}
|
|
@@ -80,7 +77,7 @@ function transformMeasureValueFilterDimensionalityToRefs(filter, oldRootAttribut
|
|
|
80
77
|
* - converts dimensionality local ids to ObjRefs when possible (when improved filters are enabled)
|
|
81
78
|
* - drops MVFs that would stay invalid/dangling after the bucket change
|
|
82
79
|
*/
|
|
83
|
-
export function sanitizeGeoReferencePointFilters(filters, oldBuckets, newBuckets
|
|
80
|
+
export function sanitizeGeoReferencePointFilters(filters, oldBuckets, newBuckets) {
|
|
84
81
|
const safeFilters = ensureFiltersBucket(filters);
|
|
85
82
|
const oldRootMeasures = getAllMeasures(oldBuckets);
|
|
86
83
|
const oldRootMeasureLocalIds = new Set(oldRootMeasures.map((m) => m.localIdentifier));
|
|
@@ -98,22 +95,13 @@ export function sanitizeGeoReferencePointFilters(filters, oldBuckets, newBuckets
|
|
|
98
95
|
if (!measureLocalId || !oldRootMeasureLocalIds.has(measureLocalId)) {
|
|
99
96
|
return item;
|
|
100
97
|
}
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const withMeasureRef = wasRemovedFromNewRoot && enableImprovedAdFilters
|
|
106
|
-
? transformMeasureValueFilterMeasureToRefIfPossible(filter, oldRootMeasures)
|
|
107
|
-
: filter;
|
|
108
|
-
const withDimensionalityRefs = transformMeasureValueFilterDimensionalityToRefs(withMeasureRef, oldRootAttributes, oldRootAttributeLocalIds, newRootAttributeLocalIds, enableImprovedAdFilters);
|
|
98
|
+
const withMeasureRef = newRootMeasureLocalIds.has(measureLocalId)
|
|
99
|
+
? filter
|
|
100
|
+
: transformMeasureValueFilterMeasureToRefIfPossible(filter, oldRootMeasures);
|
|
101
|
+
const withDimensionalityRefs = transformMeasureValueFilterDimensionalityToRefs(withMeasureRef, oldRootAttributes, oldRootAttributeLocalIds, newRootAttributeLocalIds);
|
|
109
102
|
const measureLocalIdAfter = withDimensionalityRefs.measureLocalIdentifier;
|
|
110
103
|
const isMeasureLocalIdValid = !measureLocalIdAfter || newRootMeasureLocalIds.has(measureLocalIdAfter);
|
|
111
|
-
|
|
112
|
-
const usesObjRefDimensionality = Boolean(withDimensionalityRefs.dimensionality?.some(isObjRef));
|
|
113
|
-
const usesAnyObjRefs = usesObjRefMeasure || usesObjRefDimensionality;
|
|
114
|
-
const areObjRefsAllowed = enableImprovedAdFilters || !usesAnyObjRefs;
|
|
115
|
-
const isValid = isMeasureLocalIdValid && areObjRefsAllowed;
|
|
116
|
-
if (!isValid) {
|
|
104
|
+
if (!isMeasureLocalIdValid) {
|
|
117
105
|
return undefined;
|
|
118
106
|
}
|
|
119
107
|
return { ...item, filters: [withDimensionalityRefs] };
|
|
@@ -3,8 +3,8 @@ import { type IColorPalette, type IInsightDefinition, type ISettings, type IThem
|
|
|
3
3
|
import { type IChartConfig } from "@gooddata/sdk-ui-charts";
|
|
4
4
|
import { type HeadlineControlProperties } from "../../interfaces/ControlProperties.js";
|
|
5
5
|
import { type IReferencePoint, type IUiConfig, type IVisProps, type IVisualizationProperties } from "../../interfaces/Visualization.js";
|
|
6
|
-
export declare function getDefaultHeadlineUiConfig(
|
|
7
|
-
export declare function getHeadlineUiConfig(referencePoint: IReferencePoint,
|
|
6
|
+
export declare function getDefaultHeadlineUiConfig(): IUiConfig;
|
|
7
|
+
export declare function getHeadlineUiConfig(referencePoint: IReferencePoint, intl: IntlShape): IUiConfig;
|
|
8
8
|
export declare function buildHeadlineVisualizationConfig(visualizationProperties: IVisualizationProperties, settings: ISettings | undefined, options: IVisProps): IChartConfig;
|
|
9
9
|
export declare function getHeadlineSupportedProperties(visualizationProperties: IVisualizationProperties): IVisualizationProperties<HeadlineControlProperties>;
|
|
10
10
|
export declare function isComparisonEnabled(insight: IInsightDefinition | undefined): boolean;
|
|
@@ -7,7 +7,7 @@ import { parseRGBString } from "@gooddata/sdk-ui-vis-commons";
|
|
|
7
7
|
import { messages } from "../../../locales.js";
|
|
8
8
|
import { BUCKETS } from "../../constants/bucket.js";
|
|
9
9
|
import { HEADLINE_DEFAULT_CONTROL_PROPERTIES } from "../../constants/supportedProperties.js";
|
|
10
|
-
import { DEFAULT_HEADLINE_UICONFIG
|
|
10
|
+
import { DEFAULT_HEADLINE_UICONFIG } from "../../constants/uiConfig.js";
|
|
11
11
|
import { getItemsCount, setBucketTitles } from "../bucketHelper.js";
|
|
12
12
|
import { hasNoMeasures, hasNoSecondaryMeasures, noDerivedMeasurePresent } from "../bucketRules.js";
|
|
13
13
|
import { getTranslation } from "../translations.js";
|
|
@@ -16,16 +16,13 @@ import { getTranslation } from "../translations.js";
|
|
|
16
16
|
// https://github.com/gooddata/gdc-analytical-designer/blob/develop/app/components/buckets/BucketIcon.tsx
|
|
17
17
|
const headlineMeasuresIcon = "local:headline/bucket-title-measures.svg";
|
|
18
18
|
const headlineSecondaryMeasuresIcon = "local:headline/bucket-title-secondary-measures.svg";
|
|
19
|
-
export function getDefaultHeadlineUiConfig(
|
|
19
|
+
export function getDefaultHeadlineUiConfig() {
|
|
20
20
|
const uiConfig = cloneDeep(DEFAULT_HEADLINE_UICONFIG);
|
|
21
21
|
set(uiConfig, [BUCKETS, BucketNames.SECONDARY_MEASURES, "itemsLimit"], 2);
|
|
22
|
-
if (featureFlags?.enableImprovedAdFilters && uiConfig.buckets?.["filters"]) {
|
|
23
|
-
uiConfig.buckets["filters"] = defaultImprovedFilters.filters;
|
|
24
|
-
}
|
|
25
22
|
return uiConfig;
|
|
26
23
|
}
|
|
27
|
-
export function getHeadlineUiConfig(referencePoint,
|
|
28
|
-
let uiConfig = getDefaultHeadlineUiConfig(
|
|
24
|
+
export function getHeadlineUiConfig(referencePoint, intl) {
|
|
25
|
+
let uiConfig = getDefaultHeadlineUiConfig();
|
|
29
26
|
const buckets = referencePoint?.buckets ?? [];
|
|
30
27
|
const viewCanAddPrimaryItems = hasNoMeasures(buckets);
|
|
31
28
|
const viewCanAddSecondaryItems = hasNoSecondaryMeasures(buckets);
|
|
@@ -3,4 +3,4 @@ import { type ISettings } from "@gooddata/sdk-model";
|
|
|
3
3
|
import { type IBucketOfFun, type IExtendedReferencePoint, type IUiConfig } from "../../interfaces/Visualization.js";
|
|
4
4
|
export declare function getPivotTableNextMeasuresLimit(settings: ISettings, buckets: IBucketOfFun[]): 40 | 100;
|
|
5
5
|
export declare function setPivotTableNextUiConfig(referencePoint: IExtendedReferencePoint, intl: IntlShape, visualizationType: string, settings: ISettings): void;
|
|
6
|
-
export declare function getPivotTableNextDefaultUiConfig(
|
|
6
|
+
export declare function getPivotTableNextDefaultUiConfig(): IUiConfig;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// (C) 2025 GoodData Corporation
|
|
1
|
+
// (C) 2025-2026 GoodData Corporation
|
|
2
2
|
import { cloneDeep, set } from "lodash-es";
|
|
3
3
|
import { BucketNames, OverTimeComparisonTypes } from "@gooddata/sdk-ui";
|
|
4
4
|
import { messages } from "../../../locales.js";
|
|
5
5
|
import { BUCKETS } from "../../constants/bucket.js";
|
|
6
|
-
import { INCREASE_MAX_TABLE_ATTRIBUTES_ITEMS_LIMIT, INCREASE_MAX_TABLE_MEASURE_ITEMS_LIMIT, MAX_METRICS_COUNT, MAX_TABLE_CATEGORIES_COUNT, UICONFIG, defaultFilters,
|
|
6
|
+
import { INCREASE_MAX_TABLE_ATTRIBUTES_ITEMS_LIMIT, INCREASE_MAX_TABLE_MEASURE_ITEMS_LIMIT, MAX_METRICS_COUNT, MAX_TABLE_CATEGORIES_COUNT, UICONFIG, defaultFilters, defaultRootUiConfigProperties, disabledOpenAsReportConfig, measuresBase, viewBase, } from "../../constants/uiConfig.js";
|
|
7
7
|
import { setBucketTitles } from "../bucketHelper.js";
|
|
8
8
|
import { canIncreasedTableAttributesAddMoreItems, canIncreasedTableMeasuresAddMoreItems, hasMeasuresOrRowsUnderLowerLimit, hasNoColumns, } from "../bucketRules.js";
|
|
9
9
|
import { getTranslation } from "../translations.js";
|
|
@@ -90,7 +90,7 @@ export function setPivotTableNextUiConfig(referencePoint, intl, visualizationTyp
|
|
|
90
90
|
set(referencePoint, [UICONFIG, BUCKETS, BucketNames.ATTRIBUTE, "icon"], tableRowsIcon);
|
|
91
91
|
set(referencePoint, [UICONFIG, BUCKETS, BucketNames.COLUMNS, "icon"], tableColumnsIcon);
|
|
92
92
|
}
|
|
93
|
-
export function getPivotTableNextDefaultUiConfig(
|
|
93
|
+
export function getPivotTableNextDefaultUiConfig() {
|
|
94
94
|
return {
|
|
95
95
|
buckets: {
|
|
96
96
|
measures: {
|
|
@@ -116,7 +116,7 @@ export function getPivotTableNextDefaultUiConfig(settings) {
|
|
|
116
116
|
date: MAX_TABLE_CATEGORIES_COUNT,
|
|
117
117
|
},
|
|
118
118
|
},
|
|
119
|
-
...
|
|
119
|
+
...defaultFilters,
|
|
120
120
|
},
|
|
121
121
|
...defaultRootUiConfigProperties,
|
|
122
122
|
...disabledOpenAsReportConfig,
|
|
@@ -3,4 +3,4 @@ import { type ISettings } from "@gooddata/sdk-model";
|
|
|
3
3
|
import { type IBucketOfFun, type IExtendedReferencePoint, type IUiConfig } from "../../interfaces/Visualization.js";
|
|
4
4
|
export declare function getPivotTableMeasuresLimit(settings: ISettings, buckets: IBucketOfFun[]): 40 | 100;
|
|
5
5
|
export declare function setPivotTableUiConfig(referencePoint: IExtendedReferencePoint, intl: IntlShape, visualizationType: string, settings: ISettings): void;
|
|
6
|
-
export declare function getPivotTableDefaultUiConfig(
|
|
6
|
+
export declare function getPivotTableDefaultUiConfig(): IUiConfig;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// (C) 2019-
|
|
1
|
+
// (C) 2019-2026 GoodData Corporation
|
|
2
2
|
import { cloneDeep, set } from "lodash-es";
|
|
3
3
|
import { BucketNames, OverTimeComparisonTypes } from "@gooddata/sdk-ui";
|
|
4
4
|
import { messages } from "../../../locales.js";
|
|
5
5
|
import { BUCKETS } from "../../constants/bucket.js";
|
|
6
|
-
import { INCREASE_MAX_TABLE_ATTRIBUTES_ITEMS_LIMIT, INCREASE_MAX_TABLE_MEASURE_ITEMS_LIMIT, MAX_METRICS_COUNT, MAX_TABLE_CATEGORIES_COUNT, UICONFIG, defaultFilters,
|
|
6
|
+
import { INCREASE_MAX_TABLE_ATTRIBUTES_ITEMS_LIMIT, INCREASE_MAX_TABLE_MEASURE_ITEMS_LIMIT, MAX_METRICS_COUNT, MAX_TABLE_CATEGORIES_COUNT, UICONFIG, defaultFilters, defaultRootUiConfigProperties, disabledOpenAsReportConfig, measuresBase, viewBase, } from "../../constants/uiConfig.js";
|
|
7
7
|
import { setBucketTitles } from "../bucketHelper.js";
|
|
8
8
|
import { canIncreasedTableAttributesAddMoreItems, canIncreasedTableMeasuresAddMoreItems, hasMeasuresOrRowsUnderLowerLimit, hasNoColumns, } from "../bucketRules.js";
|
|
9
9
|
import { getTranslation } from "../translations.js";
|
|
@@ -90,7 +90,7 @@ export function setPivotTableUiConfig(referencePoint, intl, visualizationType, s
|
|
|
90
90
|
set(referencePoint, [UICONFIG, BUCKETS, BucketNames.ATTRIBUTE, "icon"], tableRowsIcon);
|
|
91
91
|
set(referencePoint, [UICONFIG, BUCKETS, BucketNames.COLUMNS, "icon"], tableColumnsIcon);
|
|
92
92
|
}
|
|
93
|
-
export function getPivotTableDefaultUiConfig(
|
|
93
|
+
export function getPivotTableDefaultUiConfig() {
|
|
94
94
|
return {
|
|
95
95
|
buckets: {
|
|
96
96
|
measures: {
|
|
@@ -116,7 +116,7 @@ export function getPivotTableDefaultUiConfig(settings) {
|
|
|
116
116
|
date: MAX_TABLE_CATEGORIES_COUNT,
|
|
117
117
|
},
|
|
118
118
|
},
|
|
119
|
-
...
|
|
119
|
+
...defaultFilters,
|
|
120
120
|
},
|
|
121
121
|
...defaultRootUiConfigProperties,
|
|
122
122
|
...disabledOpenAsReportConfig,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type IntlShape } from "react-intl";
|
|
2
|
+
import { type IExtendedReferencePoint } from "../../interfaces/Visualization.js";
|
|
3
|
+
export declare function setRadarChartUiConfig(referencePoint: IExtendedReferencePoint, intl: IntlShape, visualizationType: string): IExtendedReferencePoint;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { cloneDeep, set } from "lodash-es";
|
|
3
|
+
import { BucketNames } from "@gooddata/sdk-ui";
|
|
4
|
+
import { messages } from "../../../locales.js";
|
|
5
|
+
import { ATTRIBUTE, BUCKETS, DATE } from "../../constants/bucket.js";
|
|
6
|
+
import { OPEN_AS_REPORT, SUPPORTED, UICONFIG } from "../../constants/uiConfig.js";
|
|
7
|
+
import { getStackItems, setBucketTitles } from "../bucketHelper.js";
|
|
8
|
+
import { hasNoMeasures, hasNoStacksWithDate, hasOneMeasure, hasSomeSegmentByItems } from "../bucketRules.js";
|
|
9
|
+
import { getTranslation } from "../translations.js";
|
|
10
|
+
import { getBucketItemsWarningMessage } from "./baseChartUiConfigHelper.js";
|
|
11
|
+
const radarMeasuresIcon = "local:radar/bucket-title-measures.svg";
|
|
12
|
+
const radarTrendIcon = "local:radar/bucket-title-trend.svg";
|
|
13
|
+
const radarSegmentIcon = "local:radar/bucket-title-segment.svg";
|
|
14
|
+
function setRadarChartBucketWarningMessages(referencePoint, intl) {
|
|
15
|
+
const buckets = referencePoint?.buckets || [];
|
|
16
|
+
const updatedUiConfig = cloneDeep(referencePoint?.uiConfig);
|
|
17
|
+
const stackItems = getStackItems(buckets, [ATTRIBUTE, DATE]);
|
|
18
|
+
if (!updatedUiConfig) {
|
|
19
|
+
return updatedUiConfig;
|
|
20
|
+
}
|
|
21
|
+
buckets.forEach((bucket) => {
|
|
22
|
+
const localIdentifier = bucket?.localIdentifier ?? "";
|
|
23
|
+
const bucketUiConfig = updatedUiConfig?.buckets?.[localIdentifier];
|
|
24
|
+
// skip disabled buckets
|
|
25
|
+
if (!bucketUiConfig?.enabled) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (!bucketUiConfig?.canAddItems) {
|
|
29
|
+
let warningMessage;
|
|
30
|
+
if (bucket.localIdentifier === BucketNames.MEASURES && intl) {
|
|
31
|
+
warningMessage = getBucketItemsWarningMessage(messages["metricSegment"].id, intl, stackItems);
|
|
32
|
+
}
|
|
33
|
+
else if (bucket.localIdentifier === BucketNames.SEGMENT && intl) {
|
|
34
|
+
warningMessage = getTranslation(messages["categorySegment"].id, intl);
|
|
35
|
+
}
|
|
36
|
+
if (warningMessage) {
|
|
37
|
+
set(updatedUiConfig, [BUCKETS, localIdentifier, "warningMessage"], warningMessage);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return updatedUiConfig;
|
|
42
|
+
}
|
|
43
|
+
export function setRadarChartUiConfig(referencePoint, intl, visualizationType) {
|
|
44
|
+
const referencePointConfigured = cloneDeep(referencePoint);
|
|
45
|
+
const buckets = referencePointConfigured?.buckets ?? [];
|
|
46
|
+
const measuresCanAddItems = hasNoMeasures(buckets) || hasNoStacksWithDate(buckets);
|
|
47
|
+
const segmentCanAddItems = hasSomeSegmentByItems(buckets) || hasNoMeasures(buckets) || hasOneMeasure(buckets);
|
|
48
|
+
set(referencePointConfigured, UICONFIG, setBucketTitles(referencePoint, visualizationType, intl));
|
|
49
|
+
set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.MEASURES, "canAddItems"], measuresCanAddItems);
|
|
50
|
+
set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.TREND, "canAddItems"], true);
|
|
51
|
+
set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.SEGMENT, "canAddItems"], segmentCanAddItems);
|
|
52
|
+
set(referencePointConfigured, UICONFIG, setRadarChartBucketWarningMessages(referencePointConfigured, intl));
|
|
53
|
+
set(referencePointConfigured, [UICONFIG, OPEN_AS_REPORT, SUPPORTED], false);
|
|
54
|
+
set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.MEASURES, "icon"], radarMeasuresIcon);
|
|
55
|
+
set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.TREND, "icon"], radarTrendIcon);
|
|
56
|
+
set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.SEGMENT, "icon"], radarSegmentIcon);
|
|
57
|
+
return referencePointConfigured;
|
|
58
|
+
}
|