@gooddata/sdk-ui-charts 11.68.0-alpha.7 → 11.68.0-alpha.9
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 +114 -99
- 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/headline/Headline.d.ts.map +1 -1
- package/esm/charts/headline/Headline.js +2 -2
- 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/highcharts/adapter/HighChartsRenderer.d.ts.map +1 -1
- package/esm/highcharts/adapter/HighChartsRenderer.js +3 -3
- package/esm/highcharts/adapter/legendBuilder.d.ts.map +1 -1
- package/esm/highcharts/adapter/legendBuilder.js +7 -6
- package/esm/highcharts/chartTypes/_chartCreators/commonConfiguration.js +4 -4
- package/esm/highcharts/chartTypes/_chartCreators/customConfiguration.js +3 -3
- package/esm/highcharts/chartTypes/_chartCreators/drilldownEventing.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/drilldownEventing.js +3 -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 +3 -3
- package/esm/highcharts/chartTypes/_chartCreators/responsive.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/responsive.js +2 -3
- package/esm/highcharts/chartTypes/_chartOptions/chartAxes.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartOptions/chartAxes.js +4 -5
- package/esm/highcharts/chartTypes/_chartOptions/chartDrilling.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartOptions/chartDrilling.js +4 -3
- package/esm/highcharts/chartTypes/comboChart/comboChartOptions.js +8 -8
- package/esm/highcharts/chartTypes/heatmap/heatmapColoring.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/heatmap/heatmapColoring.js +2 -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/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/package.json +13 -13
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// (C) 2020-2026 GoodData Corporation
|
|
2
|
-
import { range } from "lodash-es";
|
|
3
2
|
import { darken, mix, saturate } from "polished";
|
|
4
3
|
import { isColorFromPalette, isRgbColor } from "@gooddata/sdk-model";
|
|
5
4
|
import { isDarkTheme } from "@gooddata/sdk-ui-theme-provider";
|
|
6
5
|
import { ColorStrategy, getColorByGuid, getColorFromMapping, getRgbStringFromRGB, isCustomPalette, normalizeColorToRGB, } from "@gooddata/sdk-ui-vis-commons";
|
|
7
|
-
import { _isEqual } from "@gooddata/util";
|
|
6
|
+
import { _isEqual, _range } from "@gooddata/util";
|
|
8
7
|
import { DEFAULT_HEATMAP_BLUE_BASE_COLOR, DEFAULT_HEATMAP_BLUE_COLOR, HEATMAP_BLUE_COLOR_PALETTE, } from "../_util/color.js";
|
|
9
8
|
import { findMeasureGroupInDimensions } from "../_util/executionResultHelper.js";
|
|
10
9
|
export class HeatmapColorStrategy extends ColorStrategy {
|
|
@@ -70,7 +69,7 @@ export class HeatmapColorStrategy extends ColorStrategy {
|
|
|
70
69
|
}
|
|
71
70
|
generatePalette(colorA, colorB, steps) {
|
|
72
71
|
const extendedSteps = steps + 1;
|
|
73
|
-
const generatedPaletteIncludingBg =
|
|
72
|
+
const generatedPaletteIncludingBg = _range(extendedSteps).map((step) => normalizeColorToRGB(mix((1 / (extendedSteps - 1)) * step, colorA, colorB)));
|
|
74
73
|
return generatedPaletteIncludingBg.slice(1); // Need to remove first color as it is the same as the background
|
|
75
74
|
}
|
|
76
75
|
getDefaultColorAssignment(colorPalette, headerItem) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sankeyChartColoring.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/sankeyChart/sankeyChartColoring.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sankeyChartColoring.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/sankeyChart/sankeyChartColoring.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EACH,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,iCAAiC,EAGzC,MAAM,8BAA8B,CAAC;AAGtC,qBAAa,wBAAyB,SAAQ,aAAa;IACvD,SAAS,CAAC,qBAAqB,CAC3B,YAAY,EAAE,aAAa,EAC3B,YAAY,EAAE,aAAa,EAAE,GAAG,SAAS,EACzC,aAAa,EAAE,GAAG,EAClB,WAAW,EAAE,GAAG,EAChB,EAAE,EAAE,cAAc,GACnB,iCAAiC,CAqBnC;CACJ"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// (C) 2023-
|
|
2
|
-
import { compact, uniqBy } from "lodash-es";
|
|
1
|
+
// (C) 2023-2026 GoodData Corporation
|
|
3
2
|
import { ColorStrategy, getColorFromMapping, isValidMappedColor, } from "@gooddata/sdk-ui-vis-commons";
|
|
3
|
+
import { _compact, _uniqBy } from "@gooddata/util";
|
|
4
4
|
export class SankeyChartColorStrategy extends ColorStrategy {
|
|
5
5
|
createColorAssignment(colorPalette, colorMapping, fromAttribute, toAttribute, dv) {
|
|
6
|
-
const attributeItems =
|
|
7
|
-
const uniqAttributeItems =
|
|
6
|
+
const attributeItems = _compact([...(fromAttribute?.items ?? []), ...(toAttribute?.items ?? [])]);
|
|
7
|
+
const uniqAttributeItems = _uniqBy(attributeItems, "attributeHeaderItem.uri");
|
|
8
8
|
const colorAssignment = uniqAttributeItems.map((headerItem, index) => {
|
|
9
9
|
const mappedColor = getColorFromMapping(headerItem, colorMapping, dv);
|
|
10
10
|
const color = mappedColor && isValidMappedColor(mappedColor, colorPalette)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sankeyChartOptions.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/sankeyChart/sankeyChartOptions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sankeyChartOptions.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/sankeyChart/sankeyChartOptions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAiC,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,KAAK,cAAc,EAA0B,MAAM,8BAA8B,CAAC;AAG3F,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,KAAK,WAAW,EAAwB,MAAM,yBAAyB,CAAC;AA0FjF,eAAO,MAAM,sBAAsB,OAC3B,cAAc,oBACA,CAAC,mCAAmC,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,iBAC7D,cAAc,oBACX,MAAM,KACzB,WAAW,EAWb,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2023-2026 GoodData Corporation
|
|
2
|
-
import { compact } from "lodash-es";
|
|
3
2
|
import { getMappingHeaderFormattedName } from "@gooddata/sdk-ui";
|
|
4
3
|
import { valueWithEmptyHandling } from "@gooddata/sdk-ui-vis-commons";
|
|
4
|
+
import { _compact } from "@gooddata/util";
|
|
5
5
|
const KEYS = ["from", "to", "weight", "name"];
|
|
6
6
|
const DEFAULT_ATTRIBUTE_HEADER = "";
|
|
7
7
|
const DEFAULT_WEIGHT = 1;
|
|
@@ -14,7 +14,7 @@ const DEFAULT_WEIGHT = 1;
|
|
|
14
14
|
* value they display.
|
|
15
15
|
*/
|
|
16
16
|
const createNodeKeyGetter = (attributeHeaders) => {
|
|
17
|
-
const itemsWithNumberFormat = new Set(
|
|
17
|
+
const itemsWithNumberFormat = new Set(_compact(attributeHeaders)
|
|
18
18
|
.filter((attribute) => attribute.numberFormat)
|
|
19
19
|
.flatMap((attribute) => attribute.items));
|
|
20
20
|
return (item) => item && itemsWithNumberFormat.has(item)
|
|
@@ -45,7 +45,7 @@ const buildEmptyData = (dv) => {
|
|
|
45
45
|
];
|
|
46
46
|
};
|
|
47
47
|
const buildData = (dv, attributeHeaders, emptyHeaderTitle, getNodeKey) => {
|
|
48
|
-
const [from, to] =
|
|
48
|
+
const [from, to] = _compact(attributeHeaders);
|
|
49
49
|
const isExistingAttributeHeader = from || to;
|
|
50
50
|
if (!isExistingAttributeHeader) {
|
|
51
51
|
return buildEmptyData(dv);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scatterPlotColoring.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/scatterPlot/scatterPlotColoring.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scatterPlotColoring.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/scatterPlot/scatterPlotColoring.ts"],"names":[],"mappings":"AAGA,OAAO,EAGH,KAAK,aAAa,EAErB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,iCAAiC,EAIzC,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,qBAAa,wBAAyB,SAAQ,oBAAoB;IAC9D,UAAmB,qBAAqB,CACpC,YAAY,EAAE,aAAa,EAC3B,YAAY,EAAE,aAAa,EAAE,GAAG,SAAS,EACzC,eAAe,EAAE,GAAG,EACpB,gBAAgB,EAAE,GAAG,EACrB,EAAE,EAAE,cAAc,EAClB,YAAY,CAAC,EAAE,MAAM,GACtB,iCAAiC,CAuDnC;CACJ"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// (C) 2020-2026 GoodData Corporation
|
|
2
|
-
// import { PointsChartColorStrategy } from "../_chartColoring/pointsChart.js";
|
|
3
|
-
import { uniq } from "lodash-es";
|
|
4
2
|
import { getAttributeColorAssignment, getColorFromMapping, isValidMappedColor, } from "@gooddata/sdk-ui-vis-commons";
|
|
3
|
+
import { _uniq } from "@gooddata/util";
|
|
5
4
|
import { MeasureColorStrategy } from "../_chartColoring/measure.js";
|
|
6
5
|
export class ScatterPlotColorStrategy extends MeasureColorStrategy {
|
|
7
6
|
createColorAssignment(colorPalette, colorMapping, viewByAttribute, stackByAttribute, dv, clusterTitle) {
|
|
@@ -11,7 +10,7 @@ export class ScatterPlotColorStrategy extends MeasureColorStrategy {
|
|
|
11
10
|
let colorAssignment;
|
|
12
11
|
if (isClustering && isClusteringLoaded) {
|
|
13
12
|
// oxlint-disable-next-line @typescript-eslint/require-array-sort-compare
|
|
14
|
-
const uniqueClusters =
|
|
13
|
+
const uniqueClusters = _uniq(dv.dataView.clusteringResult.clusters).sort();
|
|
15
14
|
colorAssignment = uniqueClusters.map((clusterIndex, currentColorPaletteIndex) => {
|
|
16
15
|
const clusterHeaderItem = {
|
|
17
16
|
colorHeaderItem: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scatterPlotSeries.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/scatterPlot/scatterPlotSeries.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scatterPlotSeries.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/scatterPlot/scatterPlotSeries.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAEH,KAAK,cAAc,EAGtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,cAAc,EAA0B,MAAM,8BAA8B,CAAC;AAG3F,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAsDlF,wBAAgB,oBAAoB,CAChC,EAAE,EAAE,cAAc,EAClB,eAAe,EAAE;IAAE,KAAK,EAAE,sBAAsB,EAAE,CAAA;CAAE,GAAG,SAAS,GAAG,IAAI,EACvE,gBAAgB,EAAE;IAAE,KAAK,EAAE,sBAAsB,EAAE,CAAA;CAAE,GAAG,SAAS,GAAG,IAAI,EACxE,aAAa,EAAE,cAAc,EAC7B,gBAAgB,EAAE,MAAM,GACzB,iBAAiB,EAAE,CAwFrB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2020-2026 GoodData Corporation
|
|
2
|
-
import { debounce } from "lodash-es";
|
|
3
2
|
import { BucketNames, getMappingHeaderFormattedName, } from "@gooddata/sdk-ui";
|
|
4
3
|
import { valueWithEmptyHandling } from "@gooddata/sdk-ui-vis-commons";
|
|
4
|
+
import { _debounce } from "@gooddata/util";
|
|
5
5
|
import { parseValue } from "../_util/common.js";
|
|
6
6
|
function _decreaseOpacityOfOtherSegmentsOnMouseOver() {
|
|
7
7
|
const segmentName = this?.["segmentName"];
|
|
@@ -11,7 +11,7 @@ function _decreaseOpacityOfOtherSegmentsOnMouseOver() {
|
|
|
11
11
|
dp.graphic?.attr({ opacity: 0.3 });
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
const decreaseOpacityOfOtherSegmentsOnMouseOver =
|
|
14
|
+
const decreaseOpacityOfOtherSegmentsOnMouseOver = _debounce(_decreaseOpacityOfOtherSegmentsOnMouseOver, 50);
|
|
15
15
|
function _resetOpacityOfOtherSegmentsOnMouseOut() {
|
|
16
16
|
const segmentName = this?.["segmentName"];
|
|
17
17
|
const allDataPoints = this?.series?.data;
|
|
@@ -20,7 +20,7 @@ function _resetOpacityOfOtherSegmentsOnMouseOut() {
|
|
|
20
20
|
dp.graphic?.attr({ opacity: 1 });
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
const resetOpacityOfOtherSegmentsOnMouseOut =
|
|
23
|
+
const resetOpacityOfOtherSegmentsOnMouseOut = _debounce(_resetOpacityOfOtherSegmentsOnMouseOut, 50);
|
|
24
24
|
function _decreaseOpacityOfOtherClustersOnMouseOver() {
|
|
25
25
|
const clusterName = this?.["clusterName"];
|
|
26
26
|
const allDataPoints = this?.series?.data;
|
|
@@ -29,7 +29,7 @@ function _decreaseOpacityOfOtherClustersOnMouseOver() {
|
|
|
29
29
|
dp.graphic?.attr({ opacity: 0.3 });
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
const decreaseOpacityOfOtherClustersOnMouseOver =
|
|
32
|
+
const decreaseOpacityOfOtherClustersOnMouseOver = _debounce(_decreaseOpacityOfOtherClustersOnMouseOver, 50);
|
|
33
33
|
function _resetOpacityOfOtherClustersOnMouseOut() {
|
|
34
34
|
const clusterName = this?.["clusterName"];
|
|
35
35
|
const allDataPoints = this?.series?.data;
|
|
@@ -38,7 +38,7 @@ function _resetOpacityOfOtherClustersOnMouseOut() {
|
|
|
38
38
|
dp.graphic?.attr({ opacity: 1 });
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
const resetOpacityOfOtherClustersOnMouseOut =
|
|
41
|
+
const resetOpacityOfOtherClustersOnMouseOut = _debounce(_resetOpacityOfOtherClustersOnMouseOut, 50);
|
|
42
42
|
export function getScatterPlotSeries(dv, viewByAttribute, stackByAttribute, colorStrategy, emptyHeaderTitle) {
|
|
43
43
|
const primaryMeasuresBucketEmpty = dv.def().isBucketEmpty(BucketNames.MEASURES);
|
|
44
44
|
const secondaryMeasuresBucketEmpty = dv.def().isBucketEmpty(BucketNames.SECONDARY_MEASURES);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-charts",
|
|
3
|
-
"version": "11.68.0-alpha.
|
|
3
|
+
"version": "11.68.0-alpha.9",
|
|
4
4
|
"description": "GoodData.UI SDK - Charts",
|
|
5
5
|
"license": "LicenseRef-LICENSE",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
"ts-invariant": "0.10.3",
|
|
70
70
|
"tslib": "2.8.1",
|
|
71
71
|
"uuid": "11.1.1",
|
|
72
|
-
"@gooddata/sdk-
|
|
73
|
-
"@gooddata/sdk-
|
|
74
|
-
"@gooddata/sdk-
|
|
75
|
-
"@gooddata/sdk-ui-
|
|
76
|
-
"@gooddata/sdk-
|
|
77
|
-
"@gooddata/sdk-ui-vis-commons": "11.68.0-alpha.
|
|
78
|
-
"@gooddata/util": "11.68.0-alpha.
|
|
72
|
+
"@gooddata/sdk-ui": "11.68.0-alpha.9",
|
|
73
|
+
"@gooddata/sdk-ui-kit": "11.68.0-alpha.9",
|
|
74
|
+
"@gooddata/sdk-backend-spi": "11.68.0-alpha.9",
|
|
75
|
+
"@gooddata/sdk-ui-theme-provider": "11.68.0-alpha.9",
|
|
76
|
+
"@gooddata/sdk-model": "11.68.0-alpha.9",
|
|
77
|
+
"@gooddata/sdk-ui-vis-commons": "11.68.0-alpha.9",
|
|
78
|
+
"@gooddata/util": "11.68.0-alpha.9"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@microsoft/api-documenter": "7.30.20",
|
|
@@ -116,11 +116,11 @@
|
|
|
116
116
|
"stylelint": "16.26.1",
|
|
117
117
|
"typescript": "7.0.2",
|
|
118
118
|
"vitest": "5.0.4",
|
|
119
|
-
"@gooddata/eslint-config": "11.68.0-alpha.
|
|
120
|
-
"@gooddata/
|
|
121
|
-
"@gooddata/
|
|
122
|
-
"@gooddata/stylelint-config": "11.68.0-alpha.
|
|
123
|
-
"@gooddata/sdk-backend-mockingbird": "11.68.0-alpha.
|
|
119
|
+
"@gooddata/eslint-config": "11.68.0-alpha.9",
|
|
120
|
+
"@gooddata/reference-workspace": "11.68.0-alpha.9",
|
|
121
|
+
"@gooddata/oxlint-config": "11.68.0-alpha.9",
|
|
122
|
+
"@gooddata/stylelint-config": "11.68.0-alpha.9",
|
|
123
|
+
"@gooddata/sdk-backend-mockingbird": "11.68.0-alpha.9"
|
|
124
124
|
},
|
|
125
125
|
"peerDependencies": {
|
|
126
126
|
"react": "^18.0.0 || ^19.0.0",
|