@gooddata/sdk-ui-charts 11.60.0 → 11.61.0-alpha.1
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/esm/highcharts/ChartTransformation.d.ts.map +1 -1
- package/esm/highcharts/ChartTransformation.js +7 -1
- package/esm/highcharts/chartTypes/_chartCreators/configuratorContext.d.ts +6 -0
- package/esm/highcharts/chartTypes/_chartCreators/configuratorContext.d.ts.map +1 -0
- package/esm/highcharts/chartTypes/_chartCreators/configuratorContext.js +2 -0
- package/esm/highcharts/chartTypes/_chartCreators/customConfiguration.d.ts +5 -7
- package/esm/highcharts/chartTypes/_chartCreators/customConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/customConfiguration.js +47 -42
- package/esm/highcharts/chartTypes/_chartCreators/dataLabelsHelpers.d.ts +45 -4
- package/esm/highcharts/chartTypes/_chartCreators/dataLabelsHelpers.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getAxisLabelConfigurationForDualBarChart.d.ts +3 -5
- package/esm/highcharts/chartTypes/_chartCreators/getAxisLabelConfigurationForDualBarChart.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getAxisLabelConfigurationForDualBarChart.js +2 -2
- package/esm/highcharts/chartTypes/_chartCreators/getAxisNameConfiguration.d.ts +3 -5
- package/esm/highcharts/chartTypes/_chartCreators/getAxisNameConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getAxisNameConfiguration.js +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getChartHighlightingConfiguration.d.ts +2 -3
- package/esm/highcharts/chartTypes/_chartCreators/getChartHighlightingConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getChartHighlightingConfiguration.js +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getChartOrientationConfiguration.d.ts +2 -3
- package/esm/highcharts/chartTypes/_chartCreators/getChartOrientationConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getChartOrientationConfiguration.js +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getContinuousLineConfiguration.d.ts +2 -112
- package/esm/highcharts/chartTypes/_chartCreators/getContinuousLineConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getContinuousLineConfiguration.js +5 -1
- package/esm/highcharts/chartTypes/_chartCreators/getOptionalStackingConfiguration.d.ts +2 -1
- package/esm/highcharts/chartTypes/_chartCreators/getOptionalStackingConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getOptionalStackingConfiguration.js +2 -2
- package/esm/highcharts/chartTypes/_chartCreators/getWaterfallXAxisConfiguration.d.ts +2 -10
- package/esm/highcharts/chartTypes/_chartCreators/getWaterfallXAxisConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getWaterfallXAxisConfiguration.js +2 -1
- package/esm/highcharts/chartTypes/_chartCreators/getZeroAlignConfiguration.d.ts +3 -2
- package/esm/highcharts/chartTypes/_chartCreators/getZeroAlignConfiguration.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/getZeroAlignConfiguration.js +13 -4
- package/esm/highcharts/chartTypes/_chartCreators/highChartsCreators.d.ts +3 -6
- package/esm/highcharts/chartTypes/_chartCreators/highChartsCreators.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartCreators/highChartsCreators.js +3 -2
- package/esm/highcharts/chartTypes/_chartCreators/highchartsOptionsContext.d.ts +13 -0
- package/esm/highcharts/chartTypes/_chartCreators/highchartsOptionsContext.d.ts.map +1 -0
- package/esm/highcharts/chartTypes/_chartCreators/highchartsOptionsContext.js +2 -0
- package/esm/highcharts/chartTypes/_chartOptions/chartOptionsBuilder.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartOptions/chartOptionsBuilder.js +17 -16
- package/esm/highcharts/chartTypes/_chartOptions/extendedStackingChartOptions.d.ts +2 -6
- package/esm/highcharts/chartTypes/_chartOptions/extendedStackingChartOptions.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_chartOptions/extendedStackingChartOptions.js +1 -1
- package/esm/highcharts/chartTypes/_util/common.d.ts +4 -1
- package/esm/highcharts/chartTypes/_util/common.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/_util/common.js +13 -0
- package/esm/highcharts/chartTypes/comboChart/comboChartOptions.d.ts.map +1 -1
- package/esm/highcharts/chartTypes/comboChart/comboChartOptions.js +6 -2
- package/esm/highcharts/chartTypes/waterfallChart/waterfallChartOptions.d.ts +1 -1
- package/esm/highcharts/chartTypes/waterfallChart/waterfallChartOptions.d.ts.map +1 -1
- package/esm/highcharts/constants/label.d.ts +15 -1
- package/esm/highcharts/constants/label.d.ts.map +1 -1
- package/esm/highcharts/constants/label.js +1 -1
- package/esm/highcharts/lib/index.d.ts +3 -0
- package/esm/highcharts/lib/index.d.ts.map +1 -1
- package/esm/highcharts/lib/index.js +1 -1
- package/esm/highcharts/typings/unsafe.d.ts +7 -3
- package/esm/highcharts/typings/unsafe.d.ts.map +1 -1
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartTransformation.d.ts","sourceRoot":"","sources":["../../src/highcharts/ChartTransformation.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAoC,MAAM,OAAO,CAAC;AAQ5E,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAEH,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAMzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAuB,KAAK,iBAAiB,EAAoB,MAAM,8BAA8B,CAAC;AAE7G,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,C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const ChartTransformation = memo(function ChartTransformation({ config: c
|
|
|
55
55
|
const legendOptions = buildLegendOptions(config.legend, chartOptions, theme, intl);
|
|
56
56
|
const validationResult = validateData(config.limits, chartOptions);
|
|
57
57
|
const drillConfig = { dataView, onDrill };
|
|
58
|
-
const hcOptions = getHighchartsOptions(
|
|
58
|
+
const hcOptions = getHighchartsOptions({
|
|
59
|
+
chartOptions,
|
|
60
|
+
drillConfig,
|
|
61
|
+
chartConfig: config,
|
|
62
|
+
intl,
|
|
63
|
+
theme,
|
|
64
|
+
});
|
|
59
65
|
useEffect(() => {
|
|
60
66
|
let isFilteringRecommended = false;
|
|
61
67
|
if (validationResult.dataTooLarge) {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type HighchartsOptions } from "../../lib/index.js";
|
|
2
|
+
import { type IHighchartsOptionsContext } from "./highchartsOptionsContext.js";
|
|
3
|
+
export interface IConfiguratorContext extends IHighchartsOptionsContext {
|
|
4
|
+
highchartsOptions: HighchartsOptions;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=configuratorContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuratorContext.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/configuratorContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE/E,MAAM,WAAW,oBAAqB,SAAQ,yBAAyB;IACnE,iBAAiB,EAAE,iBAAiB,CAAC;CACxC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { type IntlShape } from "react-intl";
|
|
2
|
-
import { type ITheme } from "@gooddata/sdk-model";
|
|
3
|
-
import { type IDrillConfig } from "@gooddata/sdk-ui";
|
|
4
1
|
import { type IChartConfig } from "../../../interfaces/chartConfig.js";
|
|
5
2
|
import { type AxisLabelsFormatterCallbackFunction, type HighchartsOptions } from "../../lib/index.js";
|
|
6
|
-
import { type IChartOptions, type IUnsafeTooltipPositionerPointObject } from "../../typings/unsafe.js";
|
|
3
|
+
import { type IChartOptions, type IChartOptionsData, type IUnsafeTooltipPositionerPointObject } from "../../typings/unsafe.js";
|
|
4
|
+
import { type IHighchartsOptionsContext } from "./highchartsOptionsContext.js";
|
|
7
5
|
export declare const TOOLTIP_PADDING = 24;
|
|
8
6
|
export declare const TOOLTIP_VIEWPORT_MARGIN_TOP = 20;
|
|
9
7
|
export declare function formatOverlappingForParentAttribute(this: Highcharts.AxisLabelsFormatterContextObject, category: any): string;
|
|
@@ -16,14 +14,14 @@ export declare function getTooltipPositionInViewPort(this: Highcharts.Tooltip, c
|
|
|
16
14
|
x: number;
|
|
17
15
|
y: number;
|
|
18
16
|
};
|
|
19
|
-
export declare function percentageDataLabelFormatter(this: any, config?: IChartConfig): string;
|
|
17
|
+
export declare function percentageDataLabelFormatter(this: any, config?: IChartConfig): string | null;
|
|
20
18
|
export declare function firstValuePercentageLabelFormatter(this: any, config?: IChartConfig): string;
|
|
21
|
-
export declare function escapeCategories(dataCategories:
|
|
19
|
+
export declare function escapeCategories(dataCategories: IChartOptionsData["categories"]): IChartOptionsData["categories"];
|
|
22
20
|
export declare function areAxisLabelsEnabled(chartOptions: IChartOptions, axisPropsName: keyof IChartOptions, shouldCheckForEmptyCategories: boolean): {
|
|
23
21
|
enabled: boolean;
|
|
24
22
|
};
|
|
25
23
|
export declare const getFormatterProperty: (chartOptions: IChartOptions, axisPropsKey: "yAxisProps" | "xAxisProps" | "secondary_yAxisProps" | "secondary_xAxisProps", chartConfig: IChartConfig, axisFormat: string | undefined) => {
|
|
26
24
|
formatter?: AxisLabelsFormatterCallbackFunction;
|
|
27
25
|
};
|
|
28
|
-
export declare function getCustomizedConfiguration(chartOptions
|
|
26
|
+
export declare function getCustomizedConfiguration({ chartOptions, chartConfig, drillConfig, intl, theme, }: IHighchartsOptionsContext): HighchartsOptions;
|
|
29
27
|
//# sourceMappingURL=customConfiguration.d.ts.map
|
|
@@ -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":"AAYA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEzF,OAAO,EACH,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EAMzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEH,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAMtB,KAAK,mCAAmC,EAC3C,MAAM,yBAAyB,CAAC;AAoDjC,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;AAihBD,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;AA+DD,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;AAwUF,wBAAgB,0BAA0B,CAAC,EACvC,YAAY,EACZ,WAAW,EACX,WAAW,EACX,IAAI,EACJ,KAAK,GACR,EAAE,yBAAyB,GAAG,iBAAiB,CAqC/C"}
|
|
@@ -9,7 +9,7 @@ import { getBlackLabelStyle } from "../../constants/label.js";
|
|
|
9
9
|
import { isHighContrastMode } from "../../utils/highContrastMode.js";
|
|
10
10
|
import { supportedDualAxesChartTypes, supportedTooltipFollowPointerChartTypes, } from "../_chartOptions/chartCapabilities.js";
|
|
11
11
|
import { AXIS_LINE_COLOR } from "../_util/color.js";
|
|
12
|
-
import { isAreaChart, isBarChart, isBubbleChart, isBulletChart, isColumnChart, isComboChart, isHeatmap, isInvertedChartType, isOneOfTypes, isRotationInRange, isScatterPlot, isSupportingJoinedAttributeAxisName, percentFormatter, } from "../_util/common.js";
|
|
12
|
+
import { isAreaChart, isBarChart, isBubbleChart, isBulletChart, isColumnChart, isComboChart, isFlatCategories, isHeatmap, isInvertedChartType, isOneOfTypes, isPerAxisCategories, isRotationInRange, isScatterPlot, isSupportingJoinedAttributeAxisName, isTreeCategories, percentFormatter, } from "../_util/common.js";
|
|
13
13
|
import { canComboChartBeStackedInPercent } from "../comboChart/comboChartOptions.js";
|
|
14
14
|
import { HOVER_BRIGHTNESS, MINIMUM_HC_SAFE_BRIGHTNESS } from "./commonConfiguration.js";
|
|
15
15
|
import { getCustomTooltipSection, getCustomTooltipSeparator } from "./customTooltip/section.js";
|
|
@@ -44,7 +44,7 @@ export const TOOLTIP_PADDING = 24; // padding of tooltip container - defined by
|
|
|
44
44
|
export const TOOLTIP_VIEWPORT_MARGIN_TOP = 20;
|
|
45
45
|
const BAR_WIDTH_WHEN_TOTAL_LABELS_AVAILABLE = "90%";
|
|
46
46
|
const escapeAngleBrackets = (str) => {
|
|
47
|
-
return str
|
|
47
|
+
return str.replace(/</g, "<").replace(/>/g, ">");
|
|
48
48
|
};
|
|
49
49
|
function getAxisTitleConfiguration(axis) {
|
|
50
50
|
return (axis
|
|
@@ -55,7 +55,7 @@ function getAxisTitleConfiguration(axis) {
|
|
|
55
55
|
}
|
|
56
56
|
: {});
|
|
57
57
|
}
|
|
58
|
-
function getTitleConfiguration(chartOptions,
|
|
58
|
+
function getTitleConfiguration({ chartOptions, chartConfig }) {
|
|
59
59
|
const { yAxes = [], xAxes = [] } = chartOptions;
|
|
60
60
|
const yAxis = yAxes.map((axis) => getAxisTitleConfiguration(axis));
|
|
61
61
|
const xAxis = xAxes.map((axis) => getAxisTitleConfiguration(axis));
|
|
@@ -120,7 +120,7 @@ export function formatOverlapping() {
|
|
|
120
120
|
this.value +
|
|
121
121
|
"</div>");
|
|
122
122
|
}
|
|
123
|
-
function hideOverlappedLabels(chartOptions,
|
|
123
|
+
function hideOverlappedLabels({ chartOptions, chartConfig }) {
|
|
124
124
|
const rotation = Number(chartOptions?.xAxisProps?.rotation ?? "0");
|
|
125
125
|
// rotate labels for charts that are horizontal (bar, bullet, waterfall with vertical orientation config)
|
|
126
126
|
const isInvertedChart = isInvertedChartType(chartOptions.type, chartConfig?.orientation?.position);
|
|
@@ -333,7 +333,7 @@ function formatLabel(value, format, config = {}) {
|
|
|
333
333
|
return null;
|
|
334
334
|
}
|
|
335
335
|
const { separators } = config;
|
|
336
|
-
const parsedNumber =
|
|
336
|
+
const parsedNumber = typeof value === "string" ? parseFloat(value) : value;
|
|
337
337
|
// 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.
|
|
338
338
|
// Additionally, the test necessitates that the value should remain unformatted.
|
|
339
339
|
if (!isEmpty(format)) {
|
|
@@ -346,7 +346,7 @@ function labelFormatter(config) {
|
|
|
346
346
|
return formatLabel(this.y, this.point?.format || this.format, config);
|
|
347
347
|
}
|
|
348
348
|
function axisLabelFormatter(config, format) {
|
|
349
|
-
return this.value === 0 ? 0 : formatLabel(this.value, format, config);
|
|
349
|
+
return this.value === 0 ? "0" : formatLabel(this.value, format, config);
|
|
350
350
|
}
|
|
351
351
|
export function percentageDataLabelFormatter(config) {
|
|
352
352
|
// suppose that chart has one Y axis by default
|
|
@@ -367,8 +367,8 @@ export function firstValuePercentageLabelFormatter(config) {
|
|
|
367
367
|
const percFormatted = Math.round(percentageOfFirstValue);
|
|
368
368
|
return `${formatted} (${percFormatted}%)`;
|
|
369
369
|
}
|
|
370
|
-
function labelFormatterHeatmap(options) {
|
|
371
|
-
return formatLabel(this.point.value, options.formatGD,
|
|
370
|
+
function labelFormatterHeatmap(config, options) {
|
|
371
|
+
return formatLabel(this.point.value, options.formatGD, config);
|
|
372
372
|
}
|
|
373
373
|
function level1LabelsFormatter(config) {
|
|
374
374
|
return `${this.point?.name} (${formatLabel(this.point?.node?.val, this.point?.format, config)})`;
|
|
@@ -423,7 +423,7 @@ function stackLabelFormatter(config) {
|
|
|
423
423
|
const showStackLabel = this.isNegative || hasOnlyPositiveValues(this.axis.series, this.x) || this.total !== 0;
|
|
424
424
|
return showStackLabel ? formatLabel(this.total, this.axis?.userOptions?.defaultFormat, config) : null;
|
|
425
425
|
}
|
|
426
|
-
function getTooltipConfiguration(chartOptions,
|
|
426
|
+
function getTooltipConfiguration({ chartOptions, chartConfig, intl, }) {
|
|
427
427
|
const tooltipAction = chartOptions.actions?.tooltip;
|
|
428
428
|
const chartType = chartOptions.type;
|
|
429
429
|
const { stacking } = chartOptions;
|
|
@@ -541,7 +541,7 @@ function getPieLabelDataLabelsConfig(labelsStyle, resolvedPosition, defaultLabel
|
|
|
541
541
|
// Load event in pieConfiguration/donutConfiguration patches the distance after render.
|
|
542
542
|
return [{ ...defaultLabelsConfig, style: insideStyle, verticalAlign: "middle" }];
|
|
543
543
|
}
|
|
544
|
-
function getDataLabelsConfiguration(chartOptions,
|
|
544
|
+
function getDataLabelsConfiguration({ chartOptions, chartConfig, theme, }) {
|
|
545
545
|
const { stacking, yAxes = [], type } = chartOptions;
|
|
546
546
|
const { stackMeasuresToPercent = false, enableSeparateTotalLabels = false } = chartConfig || {};
|
|
547
547
|
const labelsVisible = chartConfig?.dataLabels?.visible;
|
|
@@ -558,6 +558,7 @@ function getDataLabelsConfiguration(chartOptions, _config, chartConfig, _drillCo
|
|
|
558
558
|
const labelsConfig = getLabelsVisibilityConfig(labelsVisible);
|
|
559
559
|
const isBackplate = labelsStyle === "backplate";
|
|
560
560
|
const styling = getLabelsStyling(type, stacking, theme, isBackplate);
|
|
561
|
+
// @ts-expect-error This is expected as legacy code appends custom properties to Highcharts types. Such properties should ideally moved somewhere else in the future.
|
|
561
562
|
const yAxis = yAxes.map((axis) => ({
|
|
562
563
|
defaultFormat: axis?.format,
|
|
563
564
|
}));
|
|
@@ -585,6 +586,7 @@ function getDataLabelsConfiguration(chartOptions, _config, chartConfig, _drillCo
|
|
|
585
586
|
: { ...labelsConfig, ...(isBackplate ? { ...styling, padding: 2 } : {}) };
|
|
586
587
|
return {
|
|
587
588
|
plotOptions: {
|
|
589
|
+
// @ts-expect-error This is expected as legacy code appends custom properties to Highcharts types. Such properties should ideally be moved somewhere else in the future.
|
|
588
590
|
gdcOptions: {
|
|
589
591
|
dataLabels: {
|
|
590
592
|
visible: labelsVisible,
|
|
@@ -623,8 +625,7 @@ function getDataLabelsConfiguration(chartOptions, _config, chartConfig, _drillCo
|
|
|
623
625
|
},
|
|
624
626
|
heatmap: {
|
|
625
627
|
dataLabels: {
|
|
626
|
-
formatter: labelFormatterHeatmap,
|
|
627
|
-
config: chartConfig,
|
|
628
|
+
formatter: partial(labelFormatterHeatmap, chartConfig),
|
|
628
629
|
...heatmapLabelsConfig,
|
|
629
630
|
},
|
|
630
631
|
},
|
|
@@ -665,33 +666,33 @@ function getDataLabelsConfiguration(chartOptions, _config, chartConfig, _drillCo
|
|
|
665
666
|
pyramid: {
|
|
666
667
|
dataLabels: {
|
|
667
668
|
...DEFAULT_LABELS_CONFIG,
|
|
668
|
-
inside:
|
|
669
|
+
inside: true,
|
|
669
670
|
},
|
|
670
671
|
},
|
|
671
672
|
funnel: {
|
|
672
673
|
dataLabels: {
|
|
673
674
|
...DEFAULT_LABELS_CONFIG,
|
|
674
675
|
formatter: partial(funnelFormatter, chartConfig),
|
|
675
|
-
inside:
|
|
676
|
+
inside: true,
|
|
676
677
|
},
|
|
677
678
|
},
|
|
678
679
|
sankey: {
|
|
679
680
|
dataLabels: {
|
|
680
681
|
...DEFAULT_LABELS_CONFIG,
|
|
681
|
-
formatter: () =>
|
|
682
|
+
formatter: () => undefined,
|
|
682
683
|
},
|
|
683
684
|
},
|
|
684
685
|
dependencywheel: {
|
|
685
686
|
dataLabels: {
|
|
686
687
|
...DEFAULT_LABELS_CONFIG,
|
|
687
|
-
formatter: () =>
|
|
688
|
+
formatter: () => undefined,
|
|
688
689
|
},
|
|
689
690
|
},
|
|
690
691
|
},
|
|
691
692
|
yAxis,
|
|
692
693
|
};
|
|
693
694
|
}
|
|
694
|
-
function getDataPointsConfiguration(
|
|
695
|
+
function getDataPointsConfiguration({ chartConfig }) {
|
|
695
696
|
const dataPointsVisible = chartConfig?.dataPoints?.visible ?? true;
|
|
696
697
|
const dataPointsConfig = {
|
|
697
698
|
marker: {
|
|
@@ -713,7 +714,7 @@ function isNonStackingConfiguration(chartOptions, chartConfig) {
|
|
|
713
714
|
}
|
|
714
715
|
return false;
|
|
715
716
|
}
|
|
716
|
-
function getStackingConfiguration(chartOptions,
|
|
717
|
+
function getStackingConfiguration({ chartOptions, chartConfig }) {
|
|
717
718
|
const { stacking, yAxes = [], type } = chartOptions;
|
|
718
719
|
if (!stacking) {
|
|
719
720
|
return {};
|
|
@@ -771,7 +772,7 @@ function getSeries(series) {
|
|
|
771
772
|
}
|
|
772
773
|
return {
|
|
773
774
|
...dataItem,
|
|
774
|
-
name: escapeAngleBrackets(dataItem.name),
|
|
775
|
+
name: dataItem.name && escapeAngleBrackets(dataItem.name),
|
|
775
776
|
};
|
|
776
777
|
}),
|
|
777
778
|
};
|
|
@@ -781,16 +782,17 @@ function getHeatmapDataConfiguration(chartOptions) {
|
|
|
781
782
|
const data = chartOptions.data || EMPTY_DATA;
|
|
782
783
|
const series = data.series;
|
|
783
784
|
const categories = data.categories ?? [];
|
|
785
|
+
const [xCategories = [], yCategories = []] = isPerAxisCategories(categories) ? categories : [];
|
|
784
786
|
return {
|
|
785
787
|
series,
|
|
786
788
|
xAxis: [
|
|
787
789
|
{
|
|
788
|
-
categories:
|
|
790
|
+
categories: xCategories,
|
|
789
791
|
},
|
|
790
792
|
],
|
|
791
793
|
yAxis: [
|
|
792
794
|
{
|
|
793
|
-
categories:
|
|
795
|
+
categories: yCategories,
|
|
794
796
|
},
|
|
795
797
|
],
|
|
796
798
|
colorAxis: {
|
|
@@ -799,16 +801,18 @@ function getHeatmapDataConfiguration(chartOptions) {
|
|
|
799
801
|
};
|
|
800
802
|
}
|
|
801
803
|
export function escapeCategories(dataCategories) {
|
|
802
|
-
|
|
803
|
-
return
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
804
|
+
if (isFlatCategories(dataCategories)) {
|
|
805
|
+
return dataCategories.map(escapeAngleBrackets);
|
|
806
|
+
}
|
|
807
|
+
if (isTreeCategories(dataCategories)) {
|
|
808
|
+
return dataCategories.map(({ name, categories }) => ({
|
|
809
|
+
name: escapeAngleBrackets(name),
|
|
810
|
+
categories: categories.map(escapeAngleBrackets),
|
|
811
|
+
}));
|
|
812
|
+
}
|
|
813
|
+
return dataCategories?.map((category) => category.map(escapeAngleBrackets));
|
|
810
814
|
}
|
|
811
|
-
function getDataConfiguration(chartOptions) {
|
|
815
|
+
function getDataConfiguration({ chartOptions }) {
|
|
812
816
|
const data = chartOptions.data || EMPTY_DATA;
|
|
813
817
|
const series = getSeries(data.series);
|
|
814
818
|
const { type } = chartOptions;
|
|
@@ -833,6 +837,7 @@ function getDataConfiguration(chartOptions) {
|
|
|
833
837
|
series,
|
|
834
838
|
xAxis: [
|
|
835
839
|
{
|
|
840
|
+
// @ts-expect-error This is expected as legacy code appends custom properties to Highcharts types. Such properties should ideally moved somewhere else in the future.
|
|
836
841
|
categories,
|
|
837
842
|
},
|
|
838
843
|
],
|
|
@@ -898,8 +903,8 @@ function getHeatMapHoverColor(config) {
|
|
|
898
903
|
}
|
|
899
904
|
return getLighterColor(resultColor, 0.2);
|
|
900
905
|
}
|
|
901
|
-
function getHoverStyles({ type }, config) {
|
|
902
|
-
let seriesMapFn
|
|
906
|
+
function getHoverStyles({ chartOptions: { type }, highchartsOptions: config, }) {
|
|
907
|
+
let seriesMapFn;
|
|
903
908
|
switch (type) {
|
|
904
909
|
case VisualizationTypes.LINE:
|
|
905
910
|
case VisualizationTypes.SCATTER:
|
|
@@ -981,10 +986,10 @@ function getHoverStyles({ type }, config) {
|
|
|
981
986
|
throw new Error(`Undefined chart type "${type}".`);
|
|
982
987
|
}
|
|
983
988
|
return {
|
|
984
|
-
series: config.series
|
|
989
|
+
series: config.series?.map((item) => seriesMapFn(item, config)),
|
|
985
990
|
};
|
|
986
991
|
}
|
|
987
|
-
function getGridConfiguration(chartOptions,
|
|
992
|
+
function getGridConfiguration({ chartOptions, theme }) {
|
|
988
993
|
const gridEnabled = chartOptions.grid?.enabled ?? true;
|
|
989
994
|
const { yAxes = [], xAxes = [] } = chartOptions;
|
|
990
995
|
const gridColor = theme?.chart?.gridColor ?? theme?.palette?.complementary?.c3 ?? styleVariables.gdColorGrid;
|
|
@@ -1240,7 +1245,7 @@ const getXAxisConfiguration = (chartOptions, chartConfig, axisValueColor, axisLa
|
|
|
1240
1245
|
return buildXAxisOptions(axis, chartOptions, chartConfig, axisValueColor, axisLabelColor, plotLineColor, forceDisableDrillOnAxes, type);
|
|
1241
1246
|
});
|
|
1242
1247
|
};
|
|
1243
|
-
function getAxesConfiguration(chartOptions,
|
|
1248
|
+
function getAxesConfiguration({ chartOptions, chartConfig, theme }) {
|
|
1244
1249
|
const isHighContrast = isHighContrastMode();
|
|
1245
1250
|
const axisValueColor = isHighContrast
|
|
1246
1251
|
? "CanvasText"
|
|
@@ -1265,14 +1270,14 @@ function getAxesConfiguration(chartOptions, _config, chartConfig, _drillConfig,
|
|
|
1265
1270
|
xAxis: getXAxisConfiguration(chartOptions, chartConfig, axisValueColor, axisLabelColor, plotLineColor),
|
|
1266
1271
|
};
|
|
1267
1272
|
}
|
|
1268
|
-
function getTargetCursorConfigurationForBulletChart({ type, data }) {
|
|
1273
|
+
function getTargetCursorConfigurationForBulletChart({ chartOptions: { type, data }, }) {
|
|
1269
1274
|
if (!isBulletChart(type)) {
|
|
1270
1275
|
return {};
|
|
1271
1276
|
}
|
|
1272
1277
|
const isTargetDrillable = data?.series?.some((series) => series.type === "bullet" && series.isDrillable);
|
|
1273
1278
|
return isTargetDrillable ? { plotOptions: { bullet: { cursor: "pointer" } } } : {};
|
|
1274
1279
|
}
|
|
1275
|
-
function getZoomingAndPanningConfiguration(
|
|
1280
|
+
function getZoomingAndPanningConfiguration({ chartConfig }) {
|
|
1276
1281
|
return chartConfig?.zoomInsight
|
|
1277
1282
|
? {
|
|
1278
1283
|
chart: {
|
|
@@ -1292,9 +1297,9 @@ function getZoomingAndPanningConfiguration(_chartOptions, _config, chartConfig)
|
|
|
1292
1297
|
},
|
|
1293
1298
|
},
|
|
1294
1299
|
}
|
|
1295
|
-
:
|
|
1300
|
+
: {};
|
|
1296
1301
|
}
|
|
1297
|
-
function getReversedStacking(chartOptions,
|
|
1302
|
+
function getReversedStacking({ chartOptions, chartConfig }) {
|
|
1298
1303
|
const { yAxes = [] } = chartOptions;
|
|
1299
1304
|
const hasAnyStackOptionSelected = chartConfig?.stackMeasures ||
|
|
1300
1305
|
chartConfig?.stackMeasuresToPercent ||
|
|
@@ -1310,7 +1315,7 @@ function getReversedStacking(chartOptions, _config, chartConfig) {
|
|
|
1310
1315
|
: {}),
|
|
1311
1316
|
};
|
|
1312
1317
|
}
|
|
1313
|
-
export function getCustomizedConfiguration(chartOptions, chartConfig, drillConfig, intl, theme) {
|
|
1318
|
+
export function getCustomizedConfiguration({ chartOptions, chartConfig, drillConfig, intl, theme, }) {
|
|
1314
1319
|
const configurators = [
|
|
1315
1320
|
getTitleConfiguration,
|
|
1316
1321
|
getAxesConfiguration,
|
|
@@ -1336,8 +1341,8 @@ export function getCustomizedConfiguration(chartOptions, chartConfig, drillConfi
|
|
|
1336
1341
|
getChartOrientationConfiguration,
|
|
1337
1342
|
getChartHighlightingConfiguration,
|
|
1338
1343
|
];
|
|
1339
|
-
const commonData = configurators.reduce((
|
|
1340
|
-
return merge(
|
|
1344
|
+
const commonData = configurators.reduce((highchartsOptions, configurator) => {
|
|
1345
|
+
return merge(highchartsOptions, configurator({ chartOptions, highchartsOptions, chartConfig, drillConfig, intl, theme }));
|
|
1341
1346
|
}, {});
|
|
1342
1347
|
return merge({}, commonData);
|
|
1343
1348
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type ITheme } from "@gooddata/sdk-model";
|
|
2
2
|
import { type IChartConfig, type IDataLabelsVisible } from "../../../interfaces/chartConfig.js";
|
|
3
3
|
import { type StackingType } from "../../constants/stacking.js";
|
|
4
|
-
import { type DataLabelsOptions } from "../../lib/index.js";
|
|
5
4
|
import { type IAxisRangeForAxes, type IRectBySize } from "./helpers.js";
|
|
6
5
|
export declare function isLabelOverlappingItsShape({ dataLabel, shapeArgs }: any): boolean;
|
|
7
6
|
export declare const getDataLabelsGdcVisible: (chart: Highcharts.Chart) => boolean | string;
|
|
@@ -32,7 +31,23 @@ export declare function getDataLabelAttributes(point: any): IRectBySize;
|
|
|
32
31
|
export declare function intersectsParentLabel(point: any, points: any[]): boolean;
|
|
33
32
|
export declare function getShapeVisiblePart(shape: any, chart: any, wholeSize: number): number;
|
|
34
33
|
export declare function getLabelStyle(type: string | undefined, stacking: StackingType | undefined, theme?: ITheme, isBackplateStyle?: boolean): Highcharts.CSSObject;
|
|
35
|
-
export declare function getLabelsStyling(type: string | undefined, stacking: StackingType | undefined, theme?: ITheme, isBackplateStyle?: boolean):
|
|
34
|
+
export declare function getLabelsStyling(type: string | undefined, stacking: StackingType | undefined, theme?: ITheme, isBackplateStyle?: boolean): {
|
|
35
|
+
style: import("highcharts").CSSObject;
|
|
36
|
+
color: string;
|
|
37
|
+
backgroundColor: string;
|
|
38
|
+
borderRadius: number;
|
|
39
|
+
borderColor: string;
|
|
40
|
+
borderWidth: number;
|
|
41
|
+
shadow?: {
|
|
42
|
+
color: string;
|
|
43
|
+
offsetX: number;
|
|
44
|
+
offsetY: number;
|
|
45
|
+
opacity: number;
|
|
46
|
+
width: number;
|
|
47
|
+
} | undefined;
|
|
48
|
+
} | {
|
|
49
|
+
style: import("highcharts").CSSObject;
|
|
50
|
+
};
|
|
36
51
|
/**
|
|
37
52
|
* A callback function to format data label and `this` is required by Highchart
|
|
38
53
|
* Ref: https://api.highcharts.com/highcharts/yAxis.labels.formatter
|
|
@@ -40,6 +55,32 @@ export declare function getLabelsStyling(type: string | undefined, stacking: Sta
|
|
|
40
55
|
export declare function formatAsPercent(this: any, unit?: number): string;
|
|
41
56
|
export declare function isInPercent(format?: string): boolean;
|
|
42
57
|
export declare function getTotalsVisibility(chartConfig?: IChartConfig): IDataLabelsVisible | undefined;
|
|
43
|
-
export declare function getTotalsVisibilityConfig(type: string | undefined, chartConfig?: IChartConfig):
|
|
44
|
-
|
|
58
|
+
export declare function getTotalsVisibilityConfig(type: string | undefined, chartConfig?: IChartConfig): {
|
|
59
|
+
enabled: boolean;
|
|
60
|
+
} | {
|
|
61
|
+
enabled: true;
|
|
62
|
+
allowOverlap: false;
|
|
63
|
+
} | {
|
|
64
|
+
enabled: true;
|
|
65
|
+
allowOverlap: true;
|
|
66
|
+
} | {
|
|
67
|
+
allowOverlap?: undefined;
|
|
68
|
+
enabled: false;
|
|
69
|
+
} | {
|
|
70
|
+
allowOverlap?: undefined;
|
|
71
|
+
enabled?: undefined;
|
|
72
|
+
};
|
|
73
|
+
export declare function getLabelsVisibilityConfig(visible: IDataLabelsVisible | undefined): {
|
|
74
|
+
enabled: true;
|
|
75
|
+
allowOverlap: false;
|
|
76
|
+
} | {
|
|
77
|
+
enabled: true;
|
|
78
|
+
allowOverlap: true;
|
|
79
|
+
} | {
|
|
80
|
+
allowOverlap?: undefined;
|
|
81
|
+
enabled: false;
|
|
82
|
+
} | {
|
|
83
|
+
allowOverlap?: undefined;
|
|
84
|
+
enabled?: undefined;
|
|
85
|
+
};
|
|
45
86
|
//# sourceMappingURL=dataLabelsHelpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataLabelsHelpers.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/dataLabelsHelpers.ts"],"names":[],"mappings":"AAEA,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,GAClC,UAAU,CAAC,SAAS,CAsBtB;AAED,wBAAgB,gBAAgB,CAC5B,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,QAAQ,EAAE,YAAY,GAAG,SAAS,EAClC,KAAK,CAAC,EAAE,MAAM,EACd,gBAAgB,GAAE,OAAe;;;;;;;;;;;;;;;;EASpC;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,GAAE,MAAY,GAAG,MAAM,CAGrE;AAED,wBAAgB,WAAW,CAAC,MAAM,GAAE,MAAW,GAAG,OAAO,CAExD;AAID,wBAAgB,mBAAmB,CAAC,WAAW,CAAC,EAAE,YAAY,GAAG,kBAAkB,GAAG,SAAS,CAQ9F;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,CAAC,EAAE,YAAY;;;;;;;;;;;;;;EAwB7F;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,kBAAkB,GAAG,SAAS;;;;;;;;;;;;EAoBhF"}
|
package/esm/highcharts/chartTypes/_chartCreators/getAxisLabelConfigurationForDualBarChart.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
3
|
-
export declare function getAxisLabelConfigurationForDualBarChart(chartOptions:
|
|
4
|
-
yAxis?: (XAxisOptions | undefined)[];
|
|
5
|
-
};
|
|
1
|
+
import { type HighchartsOptions } from "../../lib/index.js";
|
|
2
|
+
import { type IConfiguratorContext } from "./configuratorContext.js";
|
|
3
|
+
export declare function getAxisLabelConfigurationForDualBarChart({ chartOptions, }: IConfiguratorContext): HighchartsOptions;
|
|
6
4
|
//# sourceMappingURL=getAxisLabelConfigurationForDualBarChart.d.ts.map
|
package/esm/highcharts/chartTypes/_chartCreators/getAxisLabelConfigurationForDualBarChart.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAxisLabelConfigurationForDualBarChart.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/getAxisLabelConfigurationForDualBarChart.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"getAxisLabelConfigurationForDualBarChart.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/getAxisLabelConfigurationForDualBarChart.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAG5D,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAcrE,wBAAgB,wCAAwC,CAAC,EACrD,YAAY,GACf,EAAE,oBAAoB,GAAG,iBAAiB,CA+B1C"}
|
package/esm/highcharts/chartTypes/_chartCreators/getAxisLabelConfigurationForDualBarChart.js
CHANGED
|
@@ -12,7 +12,7 @@ function getLabelOptions(index, aligns) {
|
|
|
12
12
|
},
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
export function getAxisLabelConfigurationForDualBarChart(chartOptions) {
|
|
15
|
+
export function getAxisLabelConfigurationForDualBarChart({ chartOptions, }) {
|
|
16
16
|
const { type, yAxes = [] } = chartOptions;
|
|
17
17
|
const isBar = isBarChart(type);
|
|
18
18
|
const isDualAxis = yAxes.length === 2;
|
|
@@ -31,7 +31,7 @@ export function getAxisLabelConfigurationForDualBarChart(chartOptions) {
|
|
|
31
31
|
case ROTATE_NEGATIVE_90_DEGREES:
|
|
32
32
|
return getLabelOptions(index, [ALIGN_LEFT, ALIGN_RIGHT]);
|
|
33
33
|
default:
|
|
34
|
-
return
|
|
34
|
+
return {};
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
return {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
yAxis: any;
|
|
5
|
-
};
|
|
1
|
+
import { type HighchartsOptions } from "../../lib/index.js";
|
|
2
|
+
import { type IConfiguratorContext } from "./configuratorContext.js";
|
|
3
|
+
export declare function getAxisNameConfiguration({ chartOptions }: IConfiguratorContext): HighchartsOptions;
|
|
6
4
|
//# sourceMappingURL=getAxisNameConfiguration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAxisNameConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/getAxisNameConfiguration.ts"],"names":[],"mappings":"AAQA,OAAO,
|
|
1
|
+
{"version":3,"file":"getAxisNameConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/getAxisNameConfiguration.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAI5D,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAgErE,wBAAgB,wBAAwB,CAAC,EAAE,YAAY,EAAE,EAAE,oBAAoB,GAAG,iBAAiB,CAMlG"}
|
|
@@ -45,7 +45,7 @@ function getHighchartsAxisTitleConfiguration(chartOptions, axis, axisNamePrefix)
|
|
|
45
45
|
}
|
|
46
46
|
return title;
|
|
47
47
|
}
|
|
48
|
-
export function getAxisNameConfiguration(chartOptions) {
|
|
48
|
+
export function getAxisNameConfiguration({ chartOptions }) {
|
|
49
49
|
const configGetter = axisNameConfigGetter(chartOptions);
|
|
50
50
|
return {
|
|
51
51
|
xAxis: configGetter("x"),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { type IChartConfig } from "../../../interfaces/chartConfig.js";
|
|
2
1
|
import { type HighchartsOptions } from "../../lib/index.js";
|
|
3
|
-
import { type
|
|
4
|
-
export declare function getChartHighlightingConfiguration(chartOptions
|
|
2
|
+
import { type IConfiguratorContext } from "./configuratorContext.js";
|
|
3
|
+
export declare function getChartHighlightingConfiguration({ chartOptions, highchartsOptions: config, chartConfig, }: IConfiguratorContext): HighchartsOptions;
|
|
5
4
|
//# sourceMappingURL=getChartHighlightingConfiguration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getChartHighlightingConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/getChartHighlightingConfiguration.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"getChartHighlightingConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/getChartHighlightingConfiguration.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAM5D,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,wBAAgB,iCAAiC,CAAC,EAC9C,YAAY,EACZ,iBAAiB,EAAE,MAAM,EACzB,WAAW,GACd,EAAE,oBAAoB,GAAG,iBAAiB,CA8B1C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2023-2026 GoodData Corporation
|
|
2
2
|
import { getSeriesHighlightingClassNameObj, highlightChartPoints, } from "../_chartHighlighting/highlightPoints.js";
|
|
3
|
-
export function getChartHighlightingConfiguration(chartOptions, config, chartConfig) {
|
|
3
|
+
export function getChartHighlightingConfiguration({ chartOptions, highchartsOptions: config, chartConfig, }) {
|
|
4
4
|
// Here we overwrite the load event of the chart to highlight the points.
|
|
5
5
|
// Some charts already have this event, so we avoid overwriting it
|
|
6
6
|
// and rather extend the original events in particular chart's config.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { type IChartConfig } from "../../../interfaces/chartConfig.js";
|
|
2
1
|
import { type HighchartsOptions } from "../../lib/index.js";
|
|
3
|
-
import { type
|
|
4
|
-
export declare function getChartOrientationConfiguration(chartOptions
|
|
2
|
+
import { type IConfiguratorContext } from "./configuratorContext.js";
|
|
3
|
+
export declare function getChartOrientationConfiguration({ chartOptions, highchartsOptions: config, chartConfig, }: IConfiguratorContext): HighchartsOptions;
|
|
5
4
|
//# sourceMappingURL=getChartOrientationConfiguration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getChartOrientationConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/getChartOrientationConfiguration.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"getChartOrientationConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/highcharts/chartTypes/_chartCreators/getChartOrientationConfiguration.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAqB,MAAM,oBAAoB,CAAC;AAG/E,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAqBrE,wBAAgB,gCAAgC,CAAC,EAC7C,YAAY,EACZ,iBAAiB,EAAE,MAAM,EACzB,WAAW,GACd,EAAE,oBAAoB,GAAG,iBAAiB,CA0B1C"}
|
|
@@ -18,7 +18,7 @@ function shortenXAxisLabel(xAxis) {
|
|
|
18
18
|
],
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
export function getChartOrientationConfiguration(chartOptions, config, chartConfig) {
|
|
21
|
+
export function getChartOrientationConfiguration({ chartOptions, highchartsOptions: config, chartConfig, }) {
|
|
22
22
|
const { type } = chartOptions;
|
|
23
23
|
const isInverted = chartConfig?.orientation?.position === "vertical";
|
|
24
24
|
if (!isWaterfall(type) || !isInverted) {
|