@gooddata/sdk-ui-charts 11.68.0-alpha.1 → 11.68.0-alpha.10
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 +6088 -64656
- package/esm/charts/_commons/chartDefinition.d.ts.map +1 -1
- package/esm/charts/_commons/chartDefinition.js +3 -3
- package/esm/charts/_commons/dimensions.d.ts.map +1 -1
- package/esm/charts/_commons/dimensions.js +5 -5
- package/esm/charts/_commons/sanitizeStacking.d.ts.map +1 -1
- package/esm/charts/_commons/sanitizeStacking.js +2 -2
- package/esm/charts/headline/Headline.d.ts.map +1 -1
- package/esm/charts/headline/Headline.js +2 -2
- package/esm/charts/headline/HeadlineProviderFactory.d.ts.map +1 -1
- package/esm/charts/headline/HeadlineProviderFactory.js +2 -2
- package/esm/charts/headline/internal/interfaces/BaseHeadlines.d.ts.map +1 -1
- package/esm/charts/headline/internal/interfaces/BaseHeadlines.js +2 -2
- package/esm/charts/headline/internal/providers/AbstractProvider.d.ts.map +1 -1
- package/esm/charts/headline/internal/providers/AbstractProvider.js +4 -3
- package/esm/charts/headline/internal/utils/HeadlineDataItemUtils.js +2 -2
- package/esm/charts/headline/internal/utils/HeadlineTransformationUtils.d.ts.map +1 -1
- package/esm/charts/headline/internal/utils/HeadlineTransformationUtils.js +4 -4
- package/esm/charts/repeater/Repeater.d.ts.map +1 -1
- package/esm/charts/repeater/Repeater.js +2 -2
- package/esm/charts/xirr/Xirr.d.ts.map +1 -1
- package/esm/charts/xirr/Xirr.js +2 -2
- package/esm/charts/xirr/internal/utils/XirrTransformationUtils.d.ts.map +1 -1
- package/esm/charts/xirr/internal/utils/XirrTransformationUtils.js +3 -3
- package/esm/highcharts/ChartTransformation.d.ts.map +1 -1
- package/esm/highcharts/ChartTransformation.js +3 -2
- package/esm/highcharts/adapter/HighChartsRenderer.d.ts.map +1 -1
- package/esm/highcharts/adapter/HighChartsRenderer.js +5 -4
- package/esm/highcharts/adapter/legendBuilder.d.ts.map +1 -1
- package/esm/highcharts/adapter/legendBuilder.js +7 -6
- package/esm/highcharts/adapter/legendHelpers.d.ts.map +1 -1
- package/esm/highcharts/adapter/legendHelpers.js +3 -3
- package/esm/highcharts/adapter/plugins/autohideLabels/autohideColumnLabels.d.ts.map +1 -1
- package/esm/highcharts/adapter/plugins/autohideLabels/autohideColumnLabels.js +8 -7
- package/esm/highcharts/chartTypes/_chartCreators/commonConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/commonConfiguration.js +5 -4
- package/esm/highcharts/chartTypes/_chartCreators/customConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/customConfiguration.js +4 -3
- package/esm/highcharts/chartTypes/_chartCreators/drilldownEventing.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/drilldownEventing.js +4 -4
- package/esm/highcharts/chartTypes/_chartCreators/getOptionalStackingConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getOptionalStackingConfiguration.js +7 -6
- package/esm/highcharts/chartTypes/_chartCreators/getZeroAlignConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getZeroAlignConfiguration.js +3 -2
- package/esm/highcharts/chartTypes/_chartCreators/helpers.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/helpers.js +7 -6
- package/esm/highcharts/chartTypes/_chartCreators/responsive.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/responsive.js +3 -3
- package/esm/highcharts/chartTypes/_chartHighlighting/highlightPoints.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartHighlighting/highlightPoints.js +2 -2
- package/esm/highcharts/chartTypes/_chartOptions/chartAxes.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartOptions/chartAxes.js +6 -6
- package/esm/highcharts/chartTypes/_chartOptions/chartDrilling.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartOptions/chartDrilling.js +4 -3
- package/esm/highcharts/chartTypes/_chartOptions/chartOptionsBuilder.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartOptions/chartOptionsBuilder.js +4 -3
- package/esm/highcharts/chartTypes/_chartOptions/tooltip.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartOptions/tooltip.js +3 -3
- package/esm/highcharts/chartTypes/_util/color.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_util/color.js +3 -3
- package/esm/highcharts/chartTypes/barChart/barConfiguration.js +2 -2
- package/esm/highcharts/chartTypes/bulletChart/bulletChartSeries.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/bulletChart/bulletChartSeries.js +2 -2
- package/esm/highcharts/chartTypes/bulletChart/bulletConfiguration.js +2 -2
- package/esm/highcharts/chartTypes/comboChart/comboChartOptions.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/comboChart/comboChartOptions.js +9 -8
- package/esm/highcharts/chartTypes/dependencyWheelChart/dependencyWheelConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/dependencyWheelChart/dependencyWheelConfiguration.js +3 -3
- package/esm/highcharts/chartTypes/funnelChart/funnelConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/funnelChart/funnelConfiguration.js +3 -3
- package/esm/highcharts/chartTypes/heatmap/heatmapColoring.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/heatmap/heatmapColoring.js +3 -3
- package/esm/highcharts/chartTypes/heatmap/heatmapConfiguration.js +3 -3
- package/esm/highcharts/chartTypes/pyramidChart/pyramidConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/pyramidChart/pyramidConfiguration.js +3 -3
- package/esm/highcharts/chartTypes/sankeyChart/sankeyChartColoring.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/sankeyChart/sankeyChartColoring.js +4 -4
- package/esm/highcharts/chartTypes/sankeyChart/sankeyChartOptions.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/sankeyChart/sankeyChartOptions.js +3 -3
- package/esm/highcharts/chartTypes/sankeyChart/sankeyConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/sankeyChart/sankeyConfiguration.js +3 -3
- package/esm/highcharts/chartTypes/scatterPlot/scatterPlotColoring.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/scatterPlot/scatterPlotColoring.js +2 -3
- package/esm/highcharts/chartTypes/scatterPlot/scatterPlotSeries.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/scatterPlot/scatterPlotSeries.js +5 -5
- package/esm/highcharts/chartTypes/treemap/treemapChartSeries.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/treemap/treemapChartSeries.js +2 -2
- package/esm/highcharts/chartTypes/treemap/treemapConfiguration.js +3 -3
- package/package.json +13 -13
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
2
|
import Highcharts from "highcharts/esm/highcharts.js";
|
|
3
|
-
import { invoke
|
|
3
|
+
import { invoke } from "lodash-es";
|
|
4
|
+
import { _isEmpty, _set } from "@gooddata/util";
|
|
4
5
|
import { getBackplateLabelColor, getBackplateStackedLabelStyling, getBlackLabelStyle, getBlackStackedLabelStyle, } from "../../constants/label.js";
|
|
5
6
|
import { DEFAULT_CATEGORIES_LIMIT } from "../../constants/limits.js";
|
|
6
7
|
import { isHighContrastMode } from "../../utils/highContrastMode.js";
|
|
@@ -62,7 +63,7 @@ function handleTouchDeviceClick(context) {
|
|
|
62
63
|
const currentChart = context.series.chart;
|
|
63
64
|
const currentId = currentChart?.container?.id;
|
|
64
65
|
const prevId = previousChart?.container?.id;
|
|
65
|
-
const previousChartDisconnected =
|
|
66
|
+
const previousChartDisconnected = _isEmpty(previousChart);
|
|
66
67
|
if (previousChart && !previousChartDisconnected && prevId !== currentId) {
|
|
67
68
|
// Remove line chart point bubble
|
|
68
69
|
invoke(previousChart, "hoverSeries.onMouseOut");
|
|
@@ -455,7 +456,7 @@ function getThemedConfiguration(theme, config, chartOptions, intl) {
|
|
|
455
456
|
};
|
|
456
457
|
}
|
|
457
458
|
function registerDrilldownHandler(configuration, chartOptions, drillConfig) {
|
|
458
|
-
|
|
459
|
+
_set(configuration, "chart.events.drilldown", function chartDrilldownHandler(event) {
|
|
459
460
|
this.tooltip?.hide();
|
|
460
461
|
chartClick(drillConfig, event, this.container, this.id, chartOptions.type);
|
|
461
462
|
});
|
|
@@ -474,7 +475,7 @@ export function handleChartLoad(chartType) {
|
|
|
474
475
|
}
|
|
475
476
|
function registerRenderHandler(configuration, chartOptions) {
|
|
476
477
|
if (isOneOfTypes(chartOptions.type, supportedDualAxesChartTypes)) {
|
|
477
|
-
|
|
478
|
+
_set(configuration, "chart.events.render", handleChartLoad(chartOptions.type));
|
|
478
479
|
}
|
|
479
480
|
return configuration;
|
|
480
481
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/customConfiguration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"customConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/customConfiguration.ts"],"names":[],"mappings":"AAaA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEzF,OAAO,EACH,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EAMzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAEH,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAMtB,KAAK,mCAAmC,EAC3C,MAAM,yBAAyB,CAAC;AAsDjC,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AA0D/E,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,2BAA2B,KAAK,CAAC;AA2D9C,wBAAgB,mCAAmC,CAC/C,IAAI,EAAE,UAAU,CAAC,gCAAgC,EACjD,QAAQ,EAAE,GAAG,GACd,MAAM,CAkBR;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,gCAAgC,GAAG,MAAM,CAiB3F;AAoFD,wBAAgB,kCAAkC,CAC9C,IAAI,EAAE,UAAU,CAAC,OAAO,EACxB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,mCAAmC,GAC3C;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAmB1B;AA8CD,wBAAgB,4BAA4B,CACxC,IAAI,EAAE,UAAU,CAAC,OAAO,EACxB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,mCAAmC,GAC3C;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CA2B1B;AA+JD,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,YAAY,iBAa5E;AAED,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CAO3F;AA6hBD,wBAAgB,gBAAgB,CAC5B,cAAc,EAAE,iBAAiB,CAAC,YAAY,CAAC,GAChD,iBAAiB,CAAC,YAAY,CAAC,CAajC;AA6ND,wBAAgB,oBAAoB,CAChC,YAAY,EAAE,aAAa,EAC3B,aAAa,EAAE,MAAM,aAAa,EAClC,6BAA6B,EAAE,OAAO,GACvC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CActB;AAqED,eAAO,MAAM,oBAAoB,iBACf,aAAa,gBACb,YAAY,GAAG,YAAY,GAAG,sBAAsB,GAAG,sBAAsB,eAC9E,YAAY,cACb,MAAM,GAAG,SAAS,KAC/B;IAAE,SAAS,CAAC,EAAE,mCAAmC,CAAA;CAWnD,CAAC;AA0UF,wBAAgB,0BAA0B,CAAC,EACvC,YAAY,EACZ,WAAW,EACX,WAAW,EACX,IAAI,EACJ,KAAK,GACR,EAAE,yBAAyB,GAAG,iBAAiB,CA2C/C"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
2
|
import cx from "classnames";
|
|
3
|
-
import {
|
|
3
|
+
import { merge, partial, pickBy } from "lodash-es";
|
|
4
4
|
import { ClientFormatterFacade } from "@gooddata/number-formatter";
|
|
5
5
|
import { isMeasureFormatInPercent } from "@gooddata/sdk-model";
|
|
6
6
|
import { VisualizationTypes } from "@gooddata/sdk-ui";
|
|
7
7
|
import { buildTooltipLocalizedStrings, getLighterColor, isPatternObject } from "@gooddata/sdk-ui-vis-commons";
|
|
8
|
+
import { _compact, _isEmpty } from "@gooddata/util";
|
|
8
9
|
import { getBlackLabelStyle } from "../../constants/label.js";
|
|
9
10
|
import { DEFAULT_TOOLTIP_Z_INDEX } from "../../tooltipZIndex.js";
|
|
10
11
|
import { isHighContrastMode } from "../../utils/highContrastMode.js";
|
|
@@ -338,7 +339,7 @@ function formatLabel(value, format, config = {}) {
|
|
|
338
339
|
const parsedNumber = typeof value === "string" ? parseFloat(value) : value;
|
|
339
340
|
// Based on the tests, when a format is not provided, we should refrain from formatting the value using the formatter, as the default format "#,##0.00" will be used.
|
|
340
341
|
// Additionally, the test necessitates that the value should remain unformatted.
|
|
341
|
-
if (!
|
|
342
|
+
if (!_isEmpty(format)) {
|
|
342
343
|
const formatted = ClientFormatterFacade.formatValue(parsedNumber, format, separators);
|
|
343
344
|
return escapeAngleBrackets(formatted.formattedValue);
|
|
344
345
|
}
|
|
@@ -1023,7 +1024,7 @@ export function areAxisLabelsEnabled(chartOptions, axisPropsName, shouldCheckFor
|
|
|
1023
1024
|
const data = chartOptions.data || EMPTY_DATA;
|
|
1024
1025
|
const { type } = chartOptions;
|
|
1025
1026
|
const categories = isHeatmap(type) ? data.categories : escapeCategories(data.categories);
|
|
1026
|
-
const categoriesFlag = shouldCheckForEmptyCategories ? !
|
|
1027
|
+
const categoriesFlag = shouldCheckForEmptyCategories ? !_isEmpty(_compact(categories)) : true;
|
|
1027
1028
|
const axisOptions = chartOptions?.[axisPropsName];
|
|
1028
1029
|
const visible = axisOptions?.visible ?? true;
|
|
1029
1030
|
const labelsEnabled = axisOptions?.labelsEnabled ?? true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drilldownEventing.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/drilldownEventing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drilldownEventing.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/drilldownEventing.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,YAAY,EAOjB,KAAK,OAAO,EAGf,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EAAE,KAAK,sBAAsB,EAA+B,MAAM,kCAAkC,CAAC;AAE5G,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAyBlF;AA8JD,wBAAgB,UAAU,CACtB,WAAW,EAAE,YAAY,EACzB,KAAK,EAAE,UAAU,CAAC,oBAAoB,EACtC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,SAAS,GACrB,IAAI,CAEN;AAuCD,wBAAgB,cAAc,CAC1B,WAAW,EAAE,YAAY,EACzB,MAAM,EAAE,sBAAsB,EAAE,EAChC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,SAAS,GACrB,IAAI,CAEN"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
|
-
import { cloneDeep, debounce } from "lodash-es";
|
|
3
2
|
import { invariant } from "ts-invariant";
|
|
4
3
|
import { VisualizationTypes, getVisualizationType, } from "@gooddata/sdk-ui";
|
|
4
|
+
import { _cloneDeep, _debounce } from "@gooddata/util";
|
|
5
5
|
import { convertToChartType, isBulletChart, isComboChart, isHeatmap, isTreemap } from "../_util/common.js";
|
|
6
6
|
import { isGroupHighchartsDrillEvent } from "./isGroupHighchartsDrillEvent.js";
|
|
7
7
|
export function getClickableElementNameByChartType(type) {
|
|
@@ -112,7 +112,7 @@ function composeDrillContextPoint(point, chartType) {
|
|
|
112
112
|
...customProp,
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
const chartClickDebounced =
|
|
115
|
+
const chartClickDebounced = _debounce((drillConfig, event, target, chartId, chartType) => {
|
|
116
116
|
const originalEvent = event.originalEvent;
|
|
117
117
|
const { dataView, onDrill } = drillConfig;
|
|
118
118
|
const type = getVisualizationType(chartType);
|
|
@@ -150,7 +150,7 @@ const chartClickDebounced = debounce((drillConfig, event, target, chartId, chart
|
|
|
150
150
|
export function chartClick(drillConfig, event, target, chartId, chartType) {
|
|
151
151
|
chartClickDebounced(drillConfig, event, target, chartId, chartType);
|
|
152
152
|
}
|
|
153
|
-
const tickLabelClickDebounce =
|
|
153
|
+
const tickLabelClickDebounce = _debounce((drillConfig, points, target, chartId, chartType) => {
|
|
154
154
|
const { dataView, onDrill } = drillConfig;
|
|
155
155
|
const contextPoints = points.map((point) => {
|
|
156
156
|
const customProps = isBulletChart(chartType)
|
|
@@ -159,7 +159,7 @@ const tickLabelClickDebounce = debounce((drillConfig, points, target, chartId, c
|
|
|
159
159
|
return {
|
|
160
160
|
x: point.x,
|
|
161
161
|
y: point.y,
|
|
162
|
-
intersection:
|
|
162
|
+
intersection: _cloneDeep(point.drillIntersection),
|
|
163
163
|
...customProps,
|
|
164
164
|
};
|
|
165
165
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOptionalStackingConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/getOptionalStackingConfiguration.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"getOptionalStackingConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/getOptionalStackingConfiguration.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAqB,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAEH,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACpB,MAAM,yBAAyB,CAAC;AAajC,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAsFrE;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CA8BlF;AA2BD,wBAAgB,qBAAqB,CACjC,YAAY,EAAE,aAAa,EAC3B,MAAM,EAAE,iBAAiB,EACzB,WAAW,EAAE,YAAY,GAC1B,YAAY,CA+Bd;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CACzC,YAAY,EAAE,aAAa,EAC3B,MAAM,EAAE,iBAAiB,EACzB,WAAW,EAAE,YAAY,GAC1B,oBAAoB,CAoBtB;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAC3C,YAAY,EAAE,aAAa,EAC3B,MAAM,EAAE,iBAAiB,EACzB,WAAW,CAAC,EAAE,YAAY,GAC3B;IACC,KAAK,EAAE,YAAY,EAAE,CAAC;CACzB,CA4BA;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,YAAY,GAAG;IAC9D,KAAK,EAAE;QACH,WAAW,EAAE,YAAY,CAAC;KAC7B,EAAE,CAAC;CACP,CAEA;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CACzC,YAAY,EAAE,aAAa,YAAK,EAChC,WAAW,EAAE,YAAY,EACzB,OAAO,GAAE,iBAAsB,GAChC,iBAAiB,CA2BnB;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC5C,YAAY,EAAE,aAAa,EAC3B,MAAM,EAAE,iBAAiB,EACzB,WAAW,EAAE,YAAY,GAC1B,iBAAiB,CAkCnB;AAED,wBAAgB,gCAAgC,CAAC,EAC7C,YAAY,EACZ,iBAAiB,EAAE,MAAM,EACzB,WAAW,EACX,WAAW,GACd,EAAE,oBAAoB,GAAG,iBAAiB,CAa1C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
|
-
import { merge, partial
|
|
2
|
+
import { merge, partial } from "lodash-es";
|
|
3
|
+
import { _set } from "@gooddata/util";
|
|
3
4
|
import { supportedStackingAttributesChartTypes } from "../_chartOptions/chartCapabilities.js";
|
|
4
5
|
import { getPrimaryChartType, isBarChart, isColumnChart, isComboChart, isInvertedChartType, isLineChart, isMekko, } from "../_util/common.js";
|
|
5
6
|
import { canComboChartBeStackedInPercent } from "../comboChart/comboChartOptions.js";
|
|
@@ -172,15 +173,15 @@ export function getParentAttributeConfiguration(chartOptions, config, chartConfi
|
|
|
172
173
|
// parent attribute in X axis
|
|
173
174
|
const parentAttributeOptions = {};
|
|
174
175
|
// only apply font-weight to parent label
|
|
175
|
-
|
|
176
|
+
_set(parentAttributeOptions, "style", {
|
|
176
177
|
fontWeight: "bold",
|
|
177
178
|
});
|
|
178
179
|
if (isInvertedChartType(type, chartConfig?.orientation?.position)) {
|
|
179
180
|
// distance more 5px for two groups of attributes for bar chart
|
|
180
|
-
|
|
181
|
+
_set(parentAttributeOptions, "x", -5);
|
|
181
182
|
}
|
|
182
183
|
// 'groupedOptions' is custom property in 'grouped-categories' plugin
|
|
183
|
-
|
|
184
|
+
_set(xAxisItem, "labels.groupedOptions", [parentAttributeOptions]);
|
|
184
185
|
return { xAxis: [xAxisItem] };
|
|
185
186
|
}
|
|
186
187
|
export function setDrillConfigToXAxis(drillConfig) {
|
|
@@ -233,10 +234,10 @@ export function convertMinMaxFromPercentToNumber(chartOptions, config, chartConf
|
|
|
233
234
|
const { min, max } = axis;
|
|
234
235
|
const newAxis = {};
|
|
235
236
|
if (!(min === null || min === undefined) && typeof min === "number") {
|
|
236
|
-
|
|
237
|
+
_set(newAxis, "min", min * 100);
|
|
237
238
|
}
|
|
238
239
|
if (!(max === null || max === undefined) && typeof max === "number") {
|
|
239
|
-
|
|
240
|
+
_set(newAxis, "max", max * 100);
|
|
240
241
|
}
|
|
241
242
|
const numberOfAxes = axes.length;
|
|
242
243
|
if (numberOfAxes === 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getZeroAlignConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/getZeroAlignConfiguration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getZeroAlignConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/getZeroAlignConfiguration.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,KAAK,iBAAiB,EAA0B,MAAM,oBAAoB,CAAC;AAIpF,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,MAAM,WAAW,MAAM;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B,MAAM,WAAW,WAAY,SAAQ,MAAM;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC9B;AAqFD,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAqDrG;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,EAAE,CAsB1G;AAwED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAMpE;AAwHD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,EACtC,YAAY,EACZ,iBAAiB,EAAE,MAAM,GAC5B,EAAE,oBAAoB,GAAG,iBAAiB,CAoD1C"}
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Modified by `binh.nguyen@gooddata.com` to support min/max configuration
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import { partial, sum, zip } from "lodash-es";
|
|
13
|
+
import { _compact } from "@gooddata/util";
|
|
13
14
|
import { isComboChart, isLineChart, isSeriesOptionsType } from "../_util/common.js";
|
|
14
15
|
/**
|
|
15
16
|
* Check if user sets min or max
|
|
@@ -208,7 +209,7 @@ function getStackedDataMinMax(yData) {
|
|
|
208
209
|
*/
|
|
209
210
|
export function convertNumberToPercent(yData) {
|
|
210
211
|
return yData.map((columns) => {
|
|
211
|
-
const columnsWithoutNull =
|
|
212
|
+
const columnsWithoutNull = _compact(columns); // remove null values
|
|
212
213
|
const total = sum(columnsWithoutNull.map((num) => Math.abs(num)));
|
|
213
214
|
return columnsWithoutNull.map((num) => (num / total) * 100);
|
|
214
215
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAsB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/helpers.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { initial, max, maxBy, min, minBy, pick, tail, unzip, zip } from "lodash-es";
|
|
3
3
|
import { VisualizationTypes } from "@gooddata/sdk-ui";
|
|
4
|
+
import { _compact, _isEmpty } from "@gooddata/util";
|
|
4
5
|
import { BOTTOM, MIDDLE, TOP } from "../../constants/alignments.js";
|
|
5
6
|
import { MEKKO_SERIES_TYPE, isInvertedChartType } from "../_util/common.js";
|
|
6
7
|
// https://silentmatt.com/rectangle-intersection/
|
|
@@ -12,7 +13,7 @@ export const isIntersecting = (r1, r2) => r1.x < r2.x + r2.width && r1.x + r1.wi
|
|
|
12
13
|
export const toNeighbors = (array) => zip(initial(array), tail(array));
|
|
13
14
|
export const getVisibleSeries = (chart) => chart.series?.filter((s) => s.visible);
|
|
14
15
|
export const getHiddenSeries = (chart) => chart.series?.filter((s) => !s.visible);
|
|
15
|
-
export const getDataPoints = (series) =>
|
|
16
|
+
export const getDataPoints = (series) => _compact(unzip(series.map((s) => s.points)).flat());
|
|
16
17
|
export const getDataPointsOfVisibleSeries = (chart) => getDataPoints(getVisibleSeries(chart));
|
|
17
18
|
export const getChartType = (chart) => chart.options.chart?.type;
|
|
18
19
|
// Reads the pie/donut label position that customConfiguration resolved from chart data at build
|
|
@@ -27,7 +28,7 @@ export const isStacked = (chart) => {
|
|
|
27
28
|
const chartTypeOptions = chart.userOptions?.plotOptions?.[chartType];
|
|
28
29
|
const isStackedByChartType = !!chartTypeOptions?.stacking;
|
|
29
30
|
const isStackedBySeries = !!chart.userOptions?.plotOptions?.series?.stacking;
|
|
30
|
-
const hasStackedAxis = chart.axes.some((axis) => !
|
|
31
|
+
const hasStackedAxis = chart.axes.some((axis) => !_isEmpty(axis?.stacking?.stacks));
|
|
31
32
|
return (isStackedByChartType || isStackedBySeries) && hasStackedAxis;
|
|
32
33
|
};
|
|
33
34
|
export function getChartProperties(config, type) {
|
|
@@ -42,10 +43,10 @@ export function getChartProperties(config, type) {
|
|
|
42
43
|
const secondaryYAxisProps = isInvertedType
|
|
43
44
|
? { ...config.secondary_xaxis }
|
|
44
45
|
: { ...config.secondary_yaxis };
|
|
45
|
-
if (!
|
|
46
|
+
if (!_isEmpty(secondaryXAxisProps)) {
|
|
46
47
|
chartProps.secondary_xAxisProps = secondaryXAxisProps;
|
|
47
48
|
}
|
|
48
|
-
if (!
|
|
49
|
+
if (!_isEmpty(secondaryYAxisProps)) {
|
|
49
50
|
chartProps.secondary_yAxisProps = secondaryYAxisProps;
|
|
50
51
|
}
|
|
51
52
|
return chartProps;
|
|
@@ -104,7 +105,7 @@ export function shouldFollowPointerForDualAxes(chartOptions) {
|
|
|
104
105
|
chartOptions?.yAxisProps?.max,
|
|
105
106
|
chartOptions?.secondary_yAxisProps?.min,
|
|
106
107
|
chartOptions?.secondary_yAxisProps?.max,
|
|
107
|
-
].some((item) => !
|
|
108
|
+
].some((item) => !_isEmpty(item));
|
|
108
109
|
return yAxes.length > 1 && hasMinMaxValue;
|
|
109
110
|
}
|
|
110
111
|
function isMinMaxLimitData(chartOptions, key) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/responsive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/responsive.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,2BAA2B,EAAwC,MAAM,oBAAoB,CAAC;AAmH5G;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,cACxB,OAAO,eACL,MAAM,eACN,MAAM,KACnB,2BAEF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAO,2BA2CxC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// (C) 2007-
|
|
2
|
-
import {
|
|
1
|
+
// (C) 2007-2026 GoodData Corporation
|
|
2
|
+
import { _cloneDeep, _range } from "@gooddata/util";
|
|
3
3
|
const UPPER_LIMIT_RATIO = 35;
|
|
4
4
|
const BOTTOM_LIMIT_HEIGHT_RATIO = 15;
|
|
5
5
|
const BOTTOM_LIMIT_WIDTH_RATIO = 20;
|
|
@@ -29,7 +29,7 @@ const yAxisTitleDisabledOption = {
|
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
31
|
function forMultipleAxes(count, options) {
|
|
32
|
-
return
|
|
32
|
+
return _range(count).map(() => _cloneDeep(options));
|
|
33
33
|
}
|
|
34
34
|
const getResponsiveConfigOptions = (inverted, xAxesCount, yAxesCount) => {
|
|
35
35
|
const axisKeyX = inverted ? "yAxis" : "xAxis";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlightPoints.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartHighlighting/highlightPoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"highlightPoints.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartHighlighting/highlightPoints.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,WAAY,UAAU,CAAC,MAAM,EAAE,WAAW,YAAY,SA2BtF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iCAAiC,YAAa,YAAY;;;;CAEtE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2023-2026 GoodData Corporation
|
|
2
2
|
import cx from "classnames";
|
|
3
|
-
import {
|
|
3
|
+
import { _isEqual } from "@gooddata/util";
|
|
4
4
|
/**
|
|
5
5
|
* Adds highlighting class to chart points based on provided drill intersections.
|
|
6
6
|
*
|
|
@@ -19,7 +19,7 @@ export const highlightChartPoints = (series, config) => {
|
|
|
19
19
|
series.forEach((seriesItem) => {
|
|
20
20
|
seriesItem.points.forEach((point) => {
|
|
21
21
|
selectedPoints.forEach((selectedPointIntersection) => {
|
|
22
|
-
if (
|
|
22
|
+
if (_isEqual(point.drillIntersection, selectedPointIntersection)) {
|
|
23
23
|
/**
|
|
24
24
|
* In case of waterfall chart, we make sure that the `x` value is not changed.
|
|
25
25
|
* For some reason it was always changed after any class update and categories were reordered and moved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chartAxes.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartOptions/chartAxes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chartAxes.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartOptions/chartAxes.ts"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGpE,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;AAmCvE,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,GAAG,SAAS,GAAG,IAAI,EAC7E,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,GAChC,KAAK,EAAE,CAqDT;AAsID,wBAAgB,QAAQ,CACpB,EAAE,EAAE,cAAc,EAClB,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,uBAAuB,CAAC,oBAAoB,CAAC,EAC3D,gBAAgB,EAAE,mCAAmC,GAAG,SAAS,GAAG,IAAI,GACzE,KAAK,EAAE,CAoCT;AAuCD,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,CAgBhF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
|
-
import { compact, isEmpty, range } from "lodash-es";
|
|
3
2
|
import { BucketNames } from "@gooddata/sdk-ui";
|
|
3
|
+
import { _compact, _isEmpty, _range } from "@gooddata/util";
|
|
4
4
|
import { isBarChart, isBubbleChart, isComboChart, isHeatmap, isLineChart, isMekko, isOneOfTypes, isScatterPlot, isSupportingJoinedAttributeAxisName, unwrap, } from "../_util/common.js";
|
|
5
5
|
import { getMekkoMeasures } from "../mekko/mekkoChartOptions.js";
|
|
6
6
|
import { supportedDualAxesChartTypes } from "./chartCapabilities.js";
|
|
@@ -93,7 +93,7 @@ function getMekkoYAxes(dv, config, measureGroup) {
|
|
|
93
93
|
{
|
|
94
94
|
label: config.yLabel || (heightItem?.name ?? ""),
|
|
95
95
|
format: config.yFormat || heightItem?.format,
|
|
96
|
-
seriesIndices:
|
|
96
|
+
seriesIndices: _range(measureGroup.items.length),
|
|
97
97
|
},
|
|
98
98
|
];
|
|
99
99
|
}
|
|
@@ -110,7 +110,7 @@ function getDualAxesYAxes(secondaryAxisMeasures, measureGroup) {
|
|
|
110
110
|
const { measuresInFirstAxis, measuresInSecondAxis } = assignMeasuresToAxes(secondaryAxisMeasures, measureGroup);
|
|
111
111
|
const firstAxis = addSeriesIndicesToAxis(createYAxisItem(measuresInFirstAxis, false), measuresInFirstAxis);
|
|
112
112
|
const secondAxis = addSeriesIndicesToAxis(createYAxisItem(measuresInSecondAxis, true), measuresInSecondAxis);
|
|
113
|
-
return
|
|
113
|
+
return _compact([firstAxis, secondAxis]);
|
|
114
114
|
}
|
|
115
115
|
// Control (threshold) measures style the regular measures (e.g. dashed line segments) instead of being
|
|
116
116
|
// drawn on their own, so they must not count as plotted measures. Only relevant for line/combo charts.
|
|
@@ -143,7 +143,7 @@ function getDefaultYAxes(config, measureGroup, measureGroupItems, firstMeasureGr
|
|
|
143
143
|
// Keep the first measure's metadata (e.g. format) and only override the title text.
|
|
144
144
|
...firstMeasureGroupItem,
|
|
145
145
|
label: getDefaultYAxisLabel(config, measureGroup, measureGroupItems),
|
|
146
|
-
seriesIndices:
|
|
146
|
+
seriesIndices: _range(measureGroupItems.length),
|
|
147
147
|
},
|
|
148
148
|
];
|
|
149
149
|
}
|
|
@@ -166,8 +166,8 @@ export function getYAxes(dv, config, measureGroup, stackByAttribute) {
|
|
|
166
166
|
return getMekkoYAxes(dv, config, measureGroup);
|
|
167
167
|
}
|
|
168
168
|
const isDualAxes = isOneOfTypes(type, supportedDualAxesChartTypes) &&
|
|
169
|
-
!
|
|
170
|
-
!
|
|
169
|
+
!_isEmpty(measureGroupItems) &&
|
|
170
|
+
!_isEmpty(secondaryAxisMeasures);
|
|
171
171
|
if (isDualAxes) {
|
|
172
172
|
return getDualAxesYAxes(secondaryAxisMeasures, measureGroup);
|
|
173
173
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chartDrilling.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartOptions/chartDrilling.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAErB,KAAK,OAAO,EAGf,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"chartDrilling.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartOptions/chartDrilling.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAErB,KAAK,OAAO,EAGf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,uBAAuB,CAAC;AA+DjF,wBAAgB,kBAAkB,CAC9B,EAAE,EAAE,cAAc,EAClB,MAAM,EAAE,GAAG,EAAE,EACb,cAAc,EAAE,gBAAgB,EAAE,EAClC,gBAAgB,EAAE,CAAC,mCAAmC,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,EAC5E,gBAAgB,EAAE,mCAAmC,GAAG,SAAS,GAAG,IAAI,EACxE,IAAI,EAAE,OAAO,GAAG,SAAS,EACzB,sBAAsB,GAAE,OAAe,EACvC,oBAAoB,GAAE,OAAe,GACtC,GAAG,CA0HL"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { without } from "lodash-es";
|
|
3
3
|
import { getDrillIntersection, isSomeHeaderPredicateMatched, } from "@gooddata/sdk-ui";
|
|
4
|
+
import { _omit } from "@gooddata/util";
|
|
4
5
|
import { isBubbleChart, isHeatmap, isMekko, isOneOfTypes, isScatterPlot, isTreemap, unwrap, } from "../_util/common.js";
|
|
5
6
|
import { findMeasureGroupInDimensions } from "../_util/executionResultHelper.js";
|
|
6
7
|
import { multiMeasuresAlternatingTypes } from "./chartCapabilities.js";
|
|
@@ -14,7 +15,7 @@ function getViewBy(viewByAttribute, viewByIndex) {
|
|
|
14
15
|
...unwrap(viewByHeader),
|
|
15
16
|
attribute: viewByAttribute,
|
|
16
17
|
};
|
|
17
|
-
viewByAttributeDescriptor = { attributeHeader:
|
|
18
|
+
viewByAttributeDescriptor = { attributeHeader: _omit(viewByAttribute, "items") };
|
|
18
19
|
}
|
|
19
20
|
return {
|
|
20
21
|
viewByHeader,
|
|
@@ -32,7 +33,7 @@ function getStackBy(stackByAttribute, stackByIndex) {
|
|
|
32
33
|
...unwrap(stackByHeader),
|
|
33
34
|
attribute: stackByAttribute,
|
|
34
35
|
};
|
|
35
|
-
stackByAttributeDescriptor = { attributeHeader:
|
|
36
|
+
stackByAttributeDescriptor = { attributeHeader: _omit(stackByAttribute, "items") };
|
|
36
37
|
}
|
|
37
38
|
return {
|
|
38
39
|
stackByHeader,
|
|
@@ -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;
|
|
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;AAG3F,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;AAsKjC,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,wBAAgB,qBAAqB,CACjC,MAAM,EAAE,WAAW,EAAE,YAAK,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,CAggBf"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { without } from "lodash-es";
|
|
3
3
|
import { invariant } from "ts-invariant";
|
|
4
4
|
import { BucketNames, DataViewFacade, VisualizationTypes, getMappingHeaderFormattedName, } from "@gooddata/sdk-ui";
|
|
5
5
|
import { valueWithEmptyHandling } from "@gooddata/sdk-ui-vis-commons";
|
|
6
|
+
import { _cloneDeep, _isEmpty } from "@gooddata/util";
|
|
6
7
|
import { ViewByAttributesLimit } from "../../../interfaces/limits.js";
|
|
7
8
|
import { PARENT_ATTRIBUTE_INDEX, PRIMARY_ATTRIBUTE_INDEX, STACK_BY_DIMENSION_INDEX, VIEW_BY_DIMENSION_INDEX, } from "../../constants/dimensions.js";
|
|
8
9
|
import { getChartProperties } from "../_chartCreators/helpers.js";
|
|
@@ -86,7 +87,7 @@ export const HEAT_MAP_CATEGORIES_COUNT = 7;
|
|
|
86
87
|
export const DEFAULT_HEATMAP_COLOR_INDEX = 1;
|
|
87
88
|
export function getHeatmapDataClasses(series = [], colorStrategy) {
|
|
88
89
|
const values = without((series[0]?.data ?? []).map((item) => item.value), null, undefined, NaN);
|
|
89
|
-
if (
|
|
90
|
+
if (_isEmpty(values)) {
|
|
90
91
|
return [];
|
|
91
92
|
}
|
|
92
93
|
const min = Math.min(...values);
|
|
@@ -386,7 +387,7 @@ export function getChartOptions(dataView, chartConfig, drillableItems, emptyHead
|
|
|
386
387
|
}
|
|
387
388
|
if (isBubbleChart(type)) {
|
|
388
389
|
const measures = [];
|
|
389
|
-
const measureGroupCopy =
|
|
390
|
+
const measureGroupCopy = _cloneDeep(measureGroup);
|
|
390
391
|
const { xAxisProps, yAxisProps } = getChartProperties(config, type);
|
|
391
392
|
if (dv.def().isBucketEmpty(BucketNames.MEASURES)) {
|
|
392
393
|
measures.push(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartOptions/tooltip.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartOptions/tooltip.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAG7E,wBAAgB,qBAAqB,CACjC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EACzC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,UAAU,CAAC,EAAE,WAAW,GACzB,MAAM,GAAG,SAAS,CAepB;AAED,wBAAgB,2BAA2B,CACvC,wBAAwB,EAAE,OAAO,EACjC,sBAAsB,EAAE,OAAO,EAC/B,KAAK,EAAE,6BAA6B,EACpC,UAAU,CAAC,EAAE,WAAW,EACxB,eAAe,CAAC,EAAE,MAAM,GACzB,MAAM,GAAG,SAAS,CAgCpB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// (C) 2007-
|
|
2
|
-
import { isEmpty } from "lodash-es";
|
|
1
|
+
// (C) 2007-2026 GoodData Corporation
|
|
3
2
|
import { ClientFormatterFacade } from "@gooddata/number-formatter";
|
|
3
|
+
import { _isEmpty } from "@gooddata/util";
|
|
4
4
|
import { customEscape, percentFormatter } from "../_util/common.js";
|
|
5
5
|
export function formatValueForTooltip(value, format, separators) {
|
|
6
6
|
const parsedNumber = ClientFormatterFacade.convertValue(value);
|
|
7
7
|
// Based on the tests, when a format is not provided, we should refrain from formatting the value using the formatter, as the default format "#,##0.00" will be used.
|
|
8
8
|
// Additionally, the test necessitates that the value should remain unformatted.
|
|
9
|
-
if (!
|
|
9
|
+
if (!_isEmpty(format)) {
|
|
10
10
|
const result = ClientFormatterFacade.formatValue(parsedNumber, format, separators);
|
|
11
11
|
return customEscape(result.formattedValue);
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_util/color.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_util/color.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK9E,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,eAAO,MAAM,KAAK,uBAAuB,CAAC;AAC1C,eAAO,MAAM,KAAK,iBAAiB,CAAC;AACpC,eAAO,MAAM,IAAI,uBAAuB,CAAC;AACzC,eAAO,MAAM,eAAe,YAAY,CAAC;AACzC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAEzC,eAAO,MAAM,0BAA0B,UAQtC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,cAAyC,CAAC;AAEnF,eAAO,MAAM,+BAA+B,EAAE,cAA0C,CAAC;AAEzF,eAAO,MAAM,yBAAyB,EAAE,cAIvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,UAIpC,CAAC;AAEF,eAAO,MAAM,iCAAiC;;QACd,EAAE;;;QACC,EAAE;;;QACF,EAAE;;CACnC,CAAC;AAEH;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,aAAa,CAMxE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
|
-
import { isEmpty } from "lodash-es";
|
|
3
2
|
import { defineMessages } from "react-intl";
|
|
4
3
|
import { DefaultColorPalette } from "@gooddata/sdk-ui";
|
|
5
4
|
import { getColorPaletteFromColors } from "@gooddata/sdk-ui-vis-commons";
|
|
5
|
+
import { _isEmpty } from "@gooddata/util";
|
|
6
6
|
export const WHITE = "rgb(255, 255, 255)";
|
|
7
7
|
export const BLACK = "rgb(0, 0, 0)";
|
|
8
8
|
export const GRAY = "rgb(201, 213, 223)";
|
|
@@ -38,8 +38,8 @@ export const DEFAULT_WATERFALL_COLORS_MESSAGES = defineMessages({
|
|
|
38
38
|
* @internal
|
|
39
39
|
*/
|
|
40
40
|
export function getValidColorPalette(config) {
|
|
41
|
-
return
|
|
42
|
-
?
|
|
41
|
+
return _isEmpty(config.colorPalette)
|
|
42
|
+
? _isEmpty(config.colors)
|
|
43
43
|
? DefaultColorPalette
|
|
44
44
|
: getColorPaletteFromColors(config.colors)
|
|
45
45
|
: config.colorPalette;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { _cloneDeep } from "@gooddata/util";
|
|
3
3
|
import { MAX_POINT_WIDTH } from "../_chartCreators/commonConfiguration.js";
|
|
4
4
|
import { getCommonResponsiveConfig } from "../_chartCreators/responsive.js";
|
|
5
5
|
import { getAxesCounts } from "../_util/common.js";
|
|
@@ -36,7 +36,7 @@ const BAR_TEMPLATE = {
|
|
|
36
36
|
],
|
|
37
37
|
};
|
|
38
38
|
export function getBarConfiguration(config) {
|
|
39
|
-
const barConfiguration =
|
|
39
|
+
const barConfiguration = _cloneDeep(BAR_TEMPLATE);
|
|
40
40
|
if (config?.enableCompactSize && !config?.zoomInsight) {
|
|
41
41
|
const reversed = true;
|
|
42
42
|
const [xAxesCount, yAxesCount] = getAxesCounts(config);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulletChartSeries.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/bulletChart/bulletChartSeries.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bulletChartSeries.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/bulletChart/bulletChartSeries.ts"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,uBAAuB,EAC5B,KAAK,MAAM,EACX,KAAK,UAAU,EAElB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAwG1F,eAAO,MAAM,eAAe,gBAAiB,MAAM,2BAA2B,UAAU,EAAE,KAAG,OACpB,CAAC;AAE1E,eAAO,MAAM,cAAc,gBAAiB,MAAM,2BAA2B,UAAU,EAAE,KAAG,OACT,CAAC;AAEpF,eAAO,MAAM,mBAAmB,gBAAiB,MAAM,2BAA2B,UAAU,EAAE,KAAG,OACf,CAAC;AAoBnF,wBAAgB,oBAAoB,CAChC,EAAE,EAAE,cAAc,EAClB,YAAY,EAAE,uBAAuB,CAAC,oBAAoB,CAAC,EAC3D,aAAa,EAAE,cAAc,EAC7B,SAAS,EAAE,gBAAgB,GAAG,SAAS,EACvC,KAAK,EAAE,MAAM,GAAG,SAAS,SAiC5B;AAED,wBAAgB,yCAAyC,CAAC,EAAE,EAAE,cAAc,GAAG,UAAU,EAAE,CAiB1F"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2020-2026 GoodData Corporation
|
|
2
|
-
import { isEmpty } from "lodash-es";
|
|
3
2
|
import { bucketIsEmpty, } from "@gooddata/sdk-model";
|
|
4
3
|
import { BucketNames } from "@gooddata/sdk-ui";
|
|
4
|
+
import { _isEmpty } from "@gooddata/util";
|
|
5
5
|
import { MAX_POINT_WIDTH } from "../_chartCreators/commonConfiguration.js";
|
|
6
6
|
import { getChartFillProperties, getColorOrPatternFillIndex, isSolidFill, } from "../_chartOptions/patternFillOptions.js";
|
|
7
7
|
import { parseValue, unwrap } from "../_util/common.js";
|
|
@@ -112,7 +112,7 @@ export function getOccupiedMeasureBucketsLocalIdentifiers(dv) {
|
|
|
112
112
|
b.localIdentifier &&
|
|
113
113
|
availableMeasureBucketsLocalIdentifiers.indexOf(b.localIdentifier) >= 0)
|
|
114
114
|
.map((b) => b.localIdentifier);
|
|
115
|
-
return
|
|
115
|
+
return _isEmpty(notEmptyMeasureBucketsLocalIdentifiers)
|
|
116
116
|
? availableMeasureBucketsLocalIdentifiers.slice(0, executionResultData.length)
|
|
117
117
|
: notEmptyMeasureBucketsLocalIdentifiers;
|
|
118
118
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { _cloneDeep } from "@gooddata/util";
|
|
3
3
|
import { MAX_POINT_WIDTH } from "../_chartCreators/commonConfiguration.js";
|
|
4
4
|
import { getCommonResponsiveConfig } from "../_chartCreators/responsive.js";
|
|
5
5
|
const BULLET_TEMPLATE = {
|
|
@@ -44,7 +44,7 @@ const BULLET_TEMPLATE = {
|
|
|
44
44
|
],
|
|
45
45
|
};
|
|
46
46
|
export function getBulletConfiguration(config) {
|
|
47
|
-
const bulletConfiguration =
|
|
47
|
+
const bulletConfiguration = _cloneDeep(BULLET_TEMPLATE);
|
|
48
48
|
if (config?.enableCompactSize && !config?.zoomInsight) {
|
|
49
49
|
const reversed = true;
|
|
50
50
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comboChartOptions.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/comboChart/comboChartOptions.ts"],"names":[],"mappings":"AAIA,OAAO,EAIH,KAAK,uBAAuB,EAG/B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAe,KAAK,cAAc,EAAsB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"comboChartOptions.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/comboChart/comboChartOptions.ts"],"names":[],"mappings":"AAIA,OAAO,EAIH,KAAK,uBAAuB,EAG/B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAe,KAAK,cAAc,EAAsB,MAAM,kBAAkB,CAAC;AAGxF,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI3D,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAI9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,gCAIlC,CAAC;AAiBF,wBAAgB,mBAAmB,CAC/B,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,uBAAuB,CAAC,oBAAoB,CAAC,EAC3D,MAAM,EAAE,WAAW,EAAE,EACrB,EAAE,EAAE,cAAc,GACnB,WAAW,EAAE,CAiDf;AAUD,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,GAAG,OAAO,CAK1F;AAED,wBAAgB,2BAA2B,CACvC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,WAAW,EAAE,EACrB,eAAe,EAAE,YAAY,GAC9B,YAAY,CASd"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { unset } from "lodash-es";
|
|
3
3
|
import { isMeasure, measureLocalId, } from "@gooddata/sdk-model";
|
|
4
4
|
import { BucketNames, VisualizationTypes } from "@gooddata/sdk-ui";
|
|
5
|
+
import { _cloneDeep, _set } from "@gooddata/util";
|
|
5
6
|
import { isSolidFill } from "../_chartOptions/patternFillOptions.js";
|
|
6
7
|
import { isAreaChart, isColumnChart, isLineChart } from "../_util/common.js";
|
|
7
8
|
export const CHART_ORDER = {
|
|
@@ -29,7 +30,7 @@ function getMeasureIndices(bucketItems, measureGroupIdentifiers) {
|
|
|
29
30
|
}, []);
|
|
30
31
|
}
|
|
31
32
|
export function getComboChartSeries(config, measureGroup, series, dv) {
|
|
32
|
-
const updatedSeries =
|
|
33
|
+
const updatedSeries = _cloneDeep(series);
|
|
33
34
|
const measureBuckets = {};
|
|
34
35
|
const types = [config.primaryChartType, config.secondaryChartType];
|
|
35
36
|
const measureGroupIdentifiers = measureGroup.items.map((item) => item?.measureHeaderItem?.localIdentifier ?? "");
|
|
@@ -44,8 +45,8 @@ export function getComboChartSeries(config, measureGroup, series, dv) {
|
|
|
44
45
|
const chartType = CHART_ORDER[types[index]]
|
|
45
46
|
? types[index]
|
|
46
47
|
: DEFAULT_COMBO_CHART_TYPES[index];
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
_set(updatedSeries, [measureIndex, "type"], chartType);
|
|
49
|
+
_set(updatedSeries, [measureIndex, "zIndex"], CHART_ORDER[chartType]);
|
|
49
50
|
});
|
|
50
51
|
});
|
|
51
52
|
// Enforce solid color for any line series so that chart fill (pattern/outline) does not affect lines
|
|
@@ -59,13 +60,13 @@ export function getComboChartSeries(config, measureGroup, series, dv) {
|
|
|
59
60
|
if (isLineChart(series.type)) {
|
|
60
61
|
// For pattern/outline fills, base color is stored in borderColor; fallback to string color if present
|
|
61
62
|
if (baseColor) {
|
|
62
|
-
|
|
63
|
+
_set(updatedSeries, [index, "color"], baseColor);
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
else if (isAreaChart(series.type) && !isSolidFill(config.chartFill)) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
_set(updatedSeries, [index, "color"], baseColor);
|
|
68
|
+
_set(updatedSeries, [index, "fillColor"], color);
|
|
69
|
+
_set(updatedSeries, [index, "borderColor"], baseColor);
|
|
69
70
|
}
|
|
70
71
|
});
|
|
71
72
|
return updatedSeries;
|