@cloudscape-design/chart-components 1.0.159 → 1.0.160
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/core/chart-api/chart-extra-context.d.ts +4 -0
- package/core/chart-api/chart-extra-context.js +1 -0
- package/core/chart-api/chart-extra-context.js.map +1 -1
- package/core/chart-api/chart-extra-highlight.d.ts +1 -0
- package/core/chart-api/chart-extra-highlight.js +8 -4
- package/core/chart-api/chart-extra-highlight.js.map +1 -1
- package/core/chart-api/chart-extra-navigation.d.ts +1 -0
- package/core/chart-api/chart-extra-navigation.js +9 -0
- package/core/chart-api/chart-extra-navigation.js.map +1 -1
- package/core/chart-api/chart-extra-zoom.d.ts +20 -0
- package/core/chart-api/chart-extra-zoom.js +109 -0
- package/core/chart-api/chart-extra-zoom.js.map +1 -0
- package/core/chart-api/index.d.ts +5 -0
- package/core/chart-api/index.js +21 -0
- package/core/chart-api/index.js.map +1 -1
- package/core/chart-container.d.ts +2 -1
- package/core/chart-container.js +2 -2
- package/core/chart-container.js.map +1 -1
- package/core/chart-core.d.ts +2 -1
- package/core/chart-core.js +41 -34
- package/core/chart-core.js.map +1 -1
- package/core/components/core-zoom.d.ts +9 -0
- package/core/components/core-zoom.js +20 -0
- package/core/components/core-zoom.js.map +1 -0
- package/core/i18n-utils.d.ts +4 -0
- package/core/i18n-utils.js +6 -0
- package/core/i18n-utils.js.map +1 -1
- package/core/internal-interfaces.d.ts +19 -0
- package/core/internal-interfaces.js +4 -0
- package/core/internal-interfaces.js.map +1 -0
- package/core/styles.css.js +22 -21
- package/core/styles.scoped.css +27 -21
- package/core/styles.selectors.js +22 -21
- package/core/test-classes/styles.css.js +33 -30
- package/core/test-classes/styles.scoped.css +33 -30
- package/core/test-classes/styles.selectors.js +33 -30
- package/internal/chart-styles.d.ts +11 -0
- package/internal/chart-styles.js +12 -1
- package/internal/chart-styles.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
package/core/chart-core.js
CHANGED
|
@@ -18,6 +18,7 @@ import { ChartNoData } from "./components/core-no-data";
|
|
|
18
18
|
import { ChartFooter, ChartHeader } from "./components/core-slots";
|
|
19
19
|
import { ChartTooltip } from "./components/core-tooltip";
|
|
20
20
|
import { VerticalAxisTitle } from "./components/core-vertical-axis-title";
|
|
21
|
+
import { ChartZoomControls, ChartZoomLiveRegion } from "./components/core-zoom";
|
|
21
22
|
import { getFormatter } from "./formatters";
|
|
22
23
|
import { useChartI18n } from "./i18n-utils";
|
|
23
24
|
import { getLegendsProps, getPointAccessibleDescription } from "./utils";
|
|
@@ -27,10 +28,12 @@ import testClasses from "./test-classes/styles.css.js";
|
|
|
27
28
|
* CoreChart is the core internal abstraction that accepts the entire set of Highcharts options along
|
|
28
29
|
* with Cloudscape props to define custom tooltip, no-data, formatters, items visibility, and more.
|
|
29
30
|
*/
|
|
30
|
-
export function InternalCoreChart({ options, ariaLabel, ariaDescription, fitHeight, chartHeight, chartMinHeight, chartMinWidth, tooltip: tooltipOptions, noData: noDataOptions, navigator, legend: legendOptions, fallback = _jsx(Spinner, {}), callback, emphasizeBaseline = true, verticalAxisTitlePlacement = "side", i18nStrings, className, header, footer, filter, keyboardNavigation = true, onHighlight, onLegendItemHighlight, onClearHighlight, onVisibleItemsChange, visibleItems, __internalRootRef, getItemOptions, ...rest }) {
|
|
31
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
|
|
31
|
+
export function InternalCoreChart({ options, ariaLabel, ariaDescription, fitHeight, chartHeight, chartMinHeight, chartMinWidth, tooltip: tooltipOptions, noData: noDataOptions, navigator, zoom: zoomOptions, zoomRange, onZoomRangeChange, legend: legendOptions, fallback = _jsx(Spinner, {}), callback, emphasizeBaseline = true, verticalAxisTitlePlacement = "side", i18nStrings, className, header, footer, filter, keyboardNavigation = true, onHighlight, onLegendItemHighlight, onClearHighlight, onVisibleItemsChange, visibleItems, __internalRootRef, getItemOptions, ...rest }) {
|
|
32
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
|
|
32
33
|
const highcharts = rest.highcharts;
|
|
33
34
|
const labels = useChartI18n({ ariaLabel, ariaDescription, i18nStrings });
|
|
35
|
+
// The zoom applies to the first x-axis, and is ignored when the chart does not define one.
|
|
36
|
+
const zoomEnabled = !!(zoomOptions === null || zoomOptions === void 0 ? void 0 : zoomOptions.enabled) && ((_b = (_a = castArray(options.xAxis)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
|
|
34
37
|
const context = {
|
|
35
38
|
chartId: useUniqueId(),
|
|
36
39
|
noDataEnabled: !!noDataOptions,
|
|
@@ -39,15 +42,16 @@ export function InternalCoreChart({ options, ariaLabel, ariaDescription, fitHeig
|
|
|
39
42
|
keyboardNavigationEnabled: keyboardNavigation,
|
|
40
43
|
labels,
|
|
41
44
|
getItemOptions: getItemOptions !== null && getItemOptions !== void 0 ? getItemOptions : (() => ({})),
|
|
45
|
+
zoomEnabled,
|
|
42
46
|
};
|
|
43
|
-
const handlers = { onHighlight, onClearHighlight, onVisibleItemsChange };
|
|
44
|
-
const state = { visibleItems };
|
|
47
|
+
const handlers = { onHighlight, onClearHighlight, onVisibleItemsChange, onZoomRangeChange };
|
|
48
|
+
const state = { visibleItems, zoomRange };
|
|
45
49
|
const api = useChartAPI(context, handlers, state);
|
|
46
50
|
const rootClassName = clsx(testClasses.root, styles.root, fitHeight && styles["root-fit-height"], className);
|
|
47
51
|
const rootRef = useRef(null);
|
|
48
52
|
const mergedRootRef = useMergeRefs(rootRef, __internalRootRef);
|
|
49
53
|
const rootProps = { ref: mergedRootRef, className: rootClassName, ...getDataAttributes(rest) };
|
|
50
|
-
const legendPosition = (
|
|
54
|
+
const legendPosition = (_c = legendOptions === null || legendOptions === void 0 ? void 0 : legendOptions.position) !== null && _c !== void 0 ? _c : "bottom";
|
|
51
55
|
const commonLegendProps = {
|
|
52
56
|
api: api,
|
|
53
57
|
i18nStrings,
|
|
@@ -92,7 +96,7 @@ export function InternalCoreChart({ options, ariaLabel, ariaDescription, fitHeig
|
|
|
92
96
|
return (_jsx("div", { ...rootProps, children: _jsx(ChartContainer, { ...containerProps, chart: (minHeight) => (_jsx("div", { className: testClasses.fallback, style: { minHeight }, children: fallback })) }) }));
|
|
93
97
|
}
|
|
94
98
|
const apiOptions = api.getOptions();
|
|
95
|
-
const inverted = !!((
|
|
99
|
+
const inverted = !!((_d = options.chart) === null || _d === void 0 ? void 0 : _d.inverted);
|
|
96
100
|
const isRtl = getIsRtl(rootRef === null || rootRef === void 0 ? void 0 : rootRef.current);
|
|
97
101
|
// The Highcharts options takes all provided Highcharts options and custom properties and merges them together, so that
|
|
98
102
|
// the Cloudscape features and custom Highcharts extensions co-exist.
|
|
@@ -100,12 +104,12 @@ export function InternalCoreChart({ options, ariaLabel, ariaDescription, fitHeig
|
|
|
100
104
|
options = {
|
|
101
105
|
...options,
|
|
102
106
|
// Hide credits by default.
|
|
103
|
-
credits: (
|
|
107
|
+
credits: (_e = options.credits) !== null && _e !== void 0 ? _e : { enabled: false },
|
|
104
108
|
// Hide chart title by default.
|
|
105
|
-
title: (
|
|
109
|
+
title: (_f = options.title) !== null && _f !== void 0 ? _f : { text: "" },
|
|
106
110
|
// Use Cloudscape color palette by default.
|
|
107
111
|
// This cannot be reset to Highcharts' default from the outside, but it is possible to provide custom palette.
|
|
108
|
-
colors: (
|
|
112
|
+
colors: (_g = options.colors) !== null && _g !== void 0 ? _g : Styles.colors,
|
|
109
113
|
chart: {
|
|
110
114
|
// Animations are disabled by default.
|
|
111
115
|
// This is done for UX and a11y reasons as Highcharts animations do not match our animation timings, and do
|
|
@@ -114,15 +118,15 @@ export function InternalCoreChart({ options, ariaLabel, ariaDescription, fitHeig
|
|
|
114
118
|
animation: false,
|
|
115
119
|
...Styles.chart,
|
|
116
120
|
...options.chart,
|
|
117
|
-
className: clsx(testClasses["chart-plot"], (
|
|
121
|
+
className: clsx(testClasses["chart-plot"], (_h = options.chart) === null || _h === void 0 ? void 0 : _h.className),
|
|
118
122
|
// The debug errors are enabled by default in development mode, but this only works
|
|
119
123
|
// if the Highcharts debugger module is loaded.
|
|
120
|
-
displayErrors: (
|
|
121
|
-
style: { ...Styles.chartPlotCss, ...(
|
|
124
|
+
displayErrors: (_k = (_j = options.chart) === null || _j === void 0 ? void 0 : _j.displayErrors) !== null && _k !== void 0 ? _k : isDevelopment,
|
|
125
|
+
style: { ...Styles.chartPlotCss, ...(_l = options.chart) === null || _l === void 0 ? void 0 : _l.style },
|
|
122
126
|
},
|
|
123
127
|
series: options.series,
|
|
124
128
|
// Highcharts legend is disabled by default in favour of the custom Cloudscape legend.
|
|
125
|
-
legend: (
|
|
129
|
+
legend: (_m = options.legend) !== null && _m !== void 0 ? _m : { enabled: false },
|
|
126
130
|
lang: {
|
|
127
131
|
...options.lang,
|
|
128
132
|
accessibility: {
|
|
@@ -135,7 +139,7 @@ export function InternalCoreChart({ options, ariaLabel, ariaDescription, fitHeig
|
|
|
135
139
|
xAxisDescriptionSingular: labels.chartXAxisLabel ? `${labels.chartXAxisLabel}, {names[0]}` : undefined,
|
|
136
140
|
yAxisDescriptionSingular: labels.chartYAxisLabel ? `${labels.chartYAxisLabel}, {names[0]}` : undefined,
|
|
137
141
|
},
|
|
138
|
-
...(
|
|
142
|
+
...(_o = options.lang) === null || _o === void 0 ? void 0 : _o.accessibility,
|
|
139
143
|
},
|
|
140
144
|
},
|
|
141
145
|
accessibility: {
|
|
@@ -149,21 +153,24 @@ export function InternalCoreChart({ options, ariaLabel, ariaDescription, fitHeig
|
|
|
149
153
|
},
|
|
150
154
|
...options.accessibility,
|
|
151
155
|
// Highcharts keyboard navigation is disabled by default in favour of the custom Cloudscape navigation.
|
|
152
|
-
keyboardNavigation: (
|
|
156
|
+
keyboardNavigation: (_q = (_p = options.accessibility) === null || _p === void 0 ? void 0 : _p.keyboardNavigation) !== null && _q !== void 0 ? _q : { enabled: !keyboardNavigation },
|
|
153
157
|
point: {
|
|
154
158
|
// Point description formatter is overridden to respect custom axes value formatters.
|
|
155
159
|
descriptionFormatter: (point) => getPointAccessibleDescription(point, labels, {
|
|
156
160
|
sizeAxis: castArray(rest.sizeAxis),
|
|
157
161
|
}),
|
|
158
|
-
...(
|
|
162
|
+
...(_r = options.accessibility) === null || _r === void 0 ? void 0 : _r.point,
|
|
159
163
|
},
|
|
160
164
|
},
|
|
161
165
|
// We use the rtl adjusted axes (instead of the original options.xAxis/yAxis) to ensure the chart renders
|
|
162
166
|
// with the correct axis orientation for RTL layouts, matching what was used for legend positioning above.
|
|
163
|
-
xAxis: (
|
|
167
|
+
xAxis: (_s = castArray(options.xAxis)) === null || _s === void 0 ? void 0 : _s.map((xAxisOptions, index) => {
|
|
164
168
|
var _a, _b;
|
|
165
169
|
return ({
|
|
166
170
|
...Styles.xAxisOptions,
|
|
171
|
+
// Highcharts widens any range narrower than five times the closest point distance unless the axis declares
|
|
172
|
+
// a minRange, and reads zero as not declared. The smallest positive number lets the zoom show any range.
|
|
173
|
+
...(index === 0 && zoomEnabled ? { minRange: Number.MIN_VALUE } : {}),
|
|
167
174
|
...xAxisOptions,
|
|
168
175
|
// Depending on the chart.inverted the x-axis can be rendered as vertical, and needs to respect page direction.
|
|
169
176
|
reversed: !inverted && isRtl ? !xAxisOptions.reversed : xAxisOptions.reversed,
|
|
@@ -173,7 +180,7 @@ export function InternalCoreChart({ options, ariaLabel, ariaDescription, fitHeig
|
|
|
173
180
|
labels: axisLabels((_b = xAxisOptions.labels) !== null && _b !== void 0 ? _b : {}),
|
|
174
181
|
});
|
|
175
182
|
}),
|
|
176
|
-
yAxis: (
|
|
183
|
+
yAxis: (_t = castArray(options.yAxis)) === null || _t === void 0 ? void 0 : _t.map((yAxisOptions) => {
|
|
177
184
|
var _a, _b, _c;
|
|
178
185
|
return ({
|
|
179
186
|
...Styles.yAxisOptions,
|
|
@@ -198,33 +205,33 @@ export function InternalCoreChart({ options, ariaLabel, ariaDescription, fitHeig
|
|
|
198
205
|
// Sticky tracking is disabled by default due to sub-optimal UX in dense charts.
|
|
199
206
|
stickyTracking: false,
|
|
200
207
|
borderColor: Styles.seriesBorderColor,
|
|
201
|
-
...(
|
|
202
|
-
dataLabels: { style: Styles.seriesDataLabelsCss, ...(
|
|
208
|
+
...(_u = options.plotOptions) === null || _u === void 0 ? void 0 : _u.series,
|
|
209
|
+
dataLabels: { style: Styles.seriesDataLabelsCss, ...(_w = (_v = options.plotOptions) === null || _v === void 0 ? void 0 : _v.series) === null || _w === void 0 ? void 0 : _w.dataLabels },
|
|
203
210
|
states: {
|
|
204
|
-
...(
|
|
205
|
-
inactive: { opacity: Styles.seriesOpacityInactive, ...(
|
|
211
|
+
...(_y = (_x = options.plotOptions) === null || _x === void 0 ? void 0 : _x.series) === null || _y === void 0 ? void 0 : _y.states,
|
|
212
|
+
inactive: { opacity: Styles.seriesOpacityInactive, ...(_1 = (_0 = (_z = options.plotOptions) === null || _z === void 0 ? void 0 : _z.series) === null || _0 === void 0 ? void 0 : _0.states) === null || _1 === void 0 ? void 0 : _1.inactive },
|
|
206
213
|
},
|
|
207
214
|
},
|
|
208
|
-
area: { ...Styles.areaSeries, ...(
|
|
209
|
-
areaspline: { ...Styles.areaSeries, ...(
|
|
210
|
-
arearange: { ...Styles.areaSeries, ...(
|
|
211
|
-
areasplinerange: { ...Styles.areaSeries, ...(
|
|
212
|
-
line: { ...Styles.lineSeries, ...(
|
|
213
|
-
spline: { ...Styles.lineSeries, ...(
|
|
214
|
-
column: { ...Styles.columnSeries, ...(
|
|
215
|
-
errorbar: { ...Styles.errorbarSeries, ...(
|
|
215
|
+
area: { ...Styles.areaSeries, ...(_2 = options.plotOptions) === null || _2 === void 0 ? void 0 : _2.area },
|
|
216
|
+
areaspline: { ...Styles.areaSeries, ...(_3 = options.plotOptions) === null || _3 === void 0 ? void 0 : _3.areaspline },
|
|
217
|
+
arearange: { ...Styles.areaSeries, ...(_4 = options.plotOptions) === null || _4 === void 0 ? void 0 : _4.arearange },
|
|
218
|
+
areasplinerange: { ...Styles.areaSeries, ...(_5 = options.plotOptions) === null || _5 === void 0 ? void 0 : _5.areasplinerange },
|
|
219
|
+
line: { ...Styles.lineSeries, ...(_6 = options.plotOptions) === null || _6 === void 0 ? void 0 : _6.line },
|
|
220
|
+
spline: { ...Styles.lineSeries, ...(_7 = options.plotOptions) === null || _7 === void 0 ? void 0 : _7.spline },
|
|
221
|
+
column: { ...Styles.columnSeries, ...(_8 = options.plotOptions) === null || _8 === void 0 ? void 0 : _8.column },
|
|
222
|
+
errorbar: { ...Styles.errorbarSeries, ...(_9 = options.plotOptions) === null || _9 === void 0 ? void 0 : _9.errorbar },
|
|
216
223
|
// Pie chart is shown in legend by default, that is required for standalone pie charts.
|
|
217
224
|
pie: {
|
|
218
225
|
showInLegend: true,
|
|
219
226
|
...Styles.pieSeries,
|
|
220
|
-
...(
|
|
221
|
-
dataLabels: { ...Styles.pieSeriesDataLabels, ...(
|
|
227
|
+
...(_10 = options.plotOptions) === null || _10 === void 0 ? void 0 : _10.pie,
|
|
228
|
+
dataLabels: { ...Styles.pieSeriesDataLabels, ...(_12 = (_11 = options.plotOptions) === null || _11 === void 0 ? void 0 : _11.pie) === null || _12 === void 0 ? void 0 : _12.dataLabels },
|
|
222
229
|
},
|
|
223
230
|
},
|
|
224
231
|
// We don't use Highcharts tooltip, but certain tooltip options such as tooltip.snap or tooltip.shared
|
|
225
232
|
// affect the hovering behavior of Highcharts. That is only the case when the tooltip is not disabled,
|
|
226
233
|
// so we render it, but hide with styles.
|
|
227
|
-
tooltip: (
|
|
234
|
+
tooltip: (_13 = options.tooltip) !== null && _13 !== void 0 ? _13 : { enabled: true, snap: Styles.tooltipSnap, style: { opacity: 0 } },
|
|
228
235
|
};
|
|
229
236
|
const legendProps = getLegendsProps(options, legendOptions);
|
|
230
237
|
return (_jsxs("div", { ...rootProps, children: [_jsx(ChartContainer, { ...containerProps, chart: (height) => {
|
|
@@ -291,7 +298,7 @@ export function InternalCoreChart({ options, ariaLabel, ariaDescription, fitHeig
|
|
|
291
298
|
},
|
|
292
299
|
};
|
|
293
300
|
return (_jsxs(_Fragment, { children: [_jsx(ChartApplication, { api: api, keyboardNavigation: keyboardNavigation, ariaLabel: ariaLabel }), _jsx(HighchartsReact, { highcharts: highcharts, options: highchartsOptions, callback: (chart) => callback === null || callback === void 0 ? void 0 : callback({ chart, highcharts: highcharts, ...api.publicApi }) })] }));
|
|
294
|
-
}, navigator: navigator, primaryLegend: context.legendEnabled && legendProps.primary ? (_jsx(ChartLegend, { ...commonLegendProps, ...legendProps.primary, className: testClasses["legend-primary"] })) : null, secondaryLegend: context.legendEnabled && legendProps.secondary ? (_jsx(ChartLegend, { ...commonLegendProps, ...legendProps.secondary, className: testClasses["legend-secondary"] })) : null, verticalAxisTitle: verticalAxisTitlePlacement === "top" ? _jsx(VerticalAxisTitle, { api: api, inverted: !!inverted }) : null, header: (header === null || header === void 0 ? void 0 : header.content) ? _jsx(ChartHeader, { children: header.content }) : null, footer: (footer === null || footer === void 0 ? void 0 : footer.content) ? _jsx(ChartFooter, { children: footer.content }) : null, filter: (filter === null || filter === void 0 ? void 0 : filter.seriesFilter) || (filter === null || filter === void 0 ? void 0 : filter.additionalFilters) ? (_jsx(ChartFilters, { api: api, seriesFilter: filter === null || filter === void 0 ? void 0 : filter.seriesFilter, additionalFilters: filter === null || filter === void 0 ? void 0 : filter.additionalFilters, i18nStrings: i18nStrings })) : null, noData: context.noDataEnabled && _jsx(ChartNoData, { ...noDataOptions, i18nStrings: i18nStrings, api: api }) }), context.tooltipEnabled && (_jsx(ChartTooltip, { ...tooltipOptions, i18nStrings: i18nStrings, getTooltipContent: rest.getTooltipContent, sizeAxis: castArray(rest.sizeAxis), api: api }))] }));
|
|
301
|
+
}, zoomControls: zoomEnabled && !(zoomOptions === null || zoomOptions === void 0 ? void 0 : zoomOptions.hideZoomControls) ? _jsx(ChartZoomControls, { api: api, labels: labels }) : null, navigator: navigator, primaryLegend: context.legendEnabled && legendProps.primary ? (_jsx(ChartLegend, { ...commonLegendProps, ...legendProps.primary, className: testClasses["legend-primary"] })) : null, secondaryLegend: context.legendEnabled && legendProps.secondary ? (_jsx(ChartLegend, { ...commonLegendProps, ...legendProps.secondary, className: testClasses["legend-secondary"] })) : null, verticalAxisTitle: verticalAxisTitlePlacement === "top" ? _jsx(VerticalAxisTitle, { api: api, inverted: !!inverted }) : null, header: (header === null || header === void 0 ? void 0 : header.content) ? _jsx(ChartHeader, { children: header.content }) : null, footer: (footer === null || footer === void 0 ? void 0 : footer.content) ? _jsx(ChartFooter, { children: footer.content }) : null, filter: (filter === null || filter === void 0 ? void 0 : filter.seriesFilter) || (filter === null || filter === void 0 ? void 0 : filter.additionalFilters) ? (_jsx(ChartFilters, { api: api, seriesFilter: filter === null || filter === void 0 ? void 0 : filter.seriesFilter, additionalFilters: filter === null || filter === void 0 ? void 0 : filter.additionalFilters, i18nStrings: i18nStrings })) : null, noData: context.noDataEnabled && _jsx(ChartNoData, { ...noDataOptions, i18nStrings: i18nStrings, api: api }) }), context.tooltipEnabled && (_jsx(ChartTooltip, { ...tooltipOptions, i18nStrings: i18nStrings, getTooltipContent: rest.getTooltipContent, sizeAxis: castArray(rest.sizeAxis), api: api })), zoomEnabled && _jsx(ChartZoomLiveRegion, { api: api })] }));
|
|
295
302
|
}
|
|
296
303
|
function xAxisClassName(inverted, customClassName) {
|
|
297
304
|
return clsx(testClasses["axis-x"], inverted ? testClasses["axis-vertical"] : testClasses["axis-horizontal"], customClassName);
|
package/core/chart-core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-core.js","sourceRoot":"","sources":["../../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CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3D,OAAO,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACjD,CAAC;QACD,GAAG,OAAO;KACX,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CACrB,kBAAsD,EAAE,EACxD,iBAA0B;IAE1B,OAAO,iBAAiB;QACtB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,gBAAgB,EAAE,SAAS,EAAE,WAAW,CAAC,qBAAqB,CAAC,EAAE,EAAE,GAAG,eAAe,CAAC;QAC/G,CAAC,CAAC,eAAe,CAAC;AACtB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { useEffect, useRef } from \"react\";\nimport clsx from \"clsx\";\nimport type Highcharts from \"highcharts\";\nimport HighchartsReact from \"highcharts-react-official\";\n\nimport {\n getIsRtl,\n isDevelopment,\n KeyCode,\n useMergeRefs,\n useUniqueId,\n} from \"@cloudscape-design/component-toolkit/internal\";\nimport Spinner from \"@cloudscape-design/components/spinner\";\n\nimport { getDataAttributes } from \"../internal/base-component/get-data-attributes\";\nimport { InternalBaseComponentProps } from \"../internal/base-component/use-base-component\";\nimport * as Styles from \"../internal/chart-styles\";\nimport { castArray } from \"../internal/utils/utils\";\nimport { useChartAPI } from \"./chart-api\";\nimport { ChartExtraContext } from \"./chart-api/chart-extra-context\";\nimport { ChartContainer } from \"./chart-container\";\nimport { ChartApplication } from \"./components/core-application\";\nimport { ChartFilters } from \"./components/core-filters\";\nimport { ChartLegend } from \"./components/core-legend\";\nimport { ChartNoData } from \"./components/core-no-data\";\nimport { ChartFooter, ChartHeader } from \"./components/core-slots\";\nimport { ChartTooltip } from \"./components/core-tooltip\";\nimport { VerticalAxisTitle } from \"./components/core-vertical-axis-title\";\nimport { getFormatter } from \"./formatters\";\nimport { useChartI18n } from \"./i18n-utils\";\nimport { CoreChartProps } from \"./interfaces\";\nimport { getLegendsProps, getPointAccessibleDescription } from \"./utils\";\n\nimport styles from \"./styles.css.js\";\nimport testClasses from \"./test-classes/styles.css.js\";\n\n/**\n * CoreChart is the core internal abstraction that accepts the entire set of Highcharts options along\n * with Cloudscape props to define custom tooltip, no-data, formatters, items visibility, and more.\n */\nexport function InternalCoreChart({\n options,\n ariaLabel,\n ariaDescription,\n fitHeight,\n chartHeight,\n chartMinHeight,\n chartMinWidth,\n tooltip: tooltipOptions,\n noData: noDataOptions,\n navigator,\n legend: legendOptions,\n fallback = <Spinner />,\n callback,\n emphasizeBaseline = true,\n verticalAxisTitlePlacement = \"side\",\n i18nStrings,\n className,\n header,\n footer,\n filter,\n keyboardNavigation = true,\n onHighlight,\n onLegendItemHighlight,\n onClearHighlight,\n onVisibleItemsChange,\n visibleItems,\n __internalRootRef,\n getItemOptions,\n ...rest\n}: CoreChartProps & InternalBaseComponentProps) {\n const highcharts = rest.highcharts as null | typeof Highcharts;\n const labels = useChartI18n({ ariaLabel, ariaDescription, i18nStrings });\n const context: ChartExtraContext[\"settings\"] = {\n chartId: useUniqueId(),\n noDataEnabled: !!noDataOptions,\n legendEnabled: legendOptions?.enabled !== false,\n tooltipEnabled: tooltipOptions?.enabled !== false,\n keyboardNavigationEnabled: keyboardNavigation,\n labels,\n getItemOptions: getItemOptions ?? (() => ({})),\n };\n const handlers = { onHighlight, onClearHighlight, onVisibleItemsChange };\n const state = { visibleItems };\n const api = useChartAPI(context, handlers, state);\n\n const rootClassName = clsx(testClasses.root, styles.root, fitHeight && styles[\"root-fit-height\"], className);\n const rootRef = useRef<HTMLDivElement>(null);\n const mergedRootRef = useMergeRefs(rootRef, __internalRootRef);\n const rootProps = { ref: mergedRootRef, className: rootClassName, ...getDataAttributes(rest) };\n const legendPosition = legendOptions?.position ?? \"bottom\";\n const commonLegendProps = {\n api: api,\n i18nStrings,\n onItemHighlight: onLegendItemHighlight,\n getLegendTooltipContent: rest.getLegendTooltipContent,\n };\n const containerProps = {\n fitHeight,\n chartHeight,\n chartMinHeight,\n chartMinWidth,\n legendPosition,\n verticalAxisTitlePlacement,\n legendBottomMaxHeight: legendOptions?.bottomMaxHeight,\n };\n\n // AWSUI-61678\n // Add global Escape key listener to dismiss hover tooltips for WCAG Content on Hover/Focus compliance\n // This listener handles Escape when using mouse hover. When keyboard navigation is active (application\n // element is focused), the navigation handler deals with Escape, so we skip to avoid conflicts.\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n // Skip if keyboard navigation is handling this (event originated from application element)\n const target = event.target as Element;\n if (context.keyboardNavigationEnabled && target?.closest('[role=\"application\"]')) {\n return;\n }\n\n if (event.keyCode === KeyCode.escape && context.tooltipEnabled) {\n const tooltipState = api.tooltipStore.get();\n if (tooltipState.visible && !tooltipState.pinned) {\n api.hideTooltip();\n }\n }\n };\n\n document.addEventListener(\"keydown\", handleKeyDown);\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown);\n };\n }, [api, context.tooltipEnabled, context.keyboardNavigationEnabled]);\n\n // Render fallback using the same root and container props as for the chart to ensure consistent\n // size, test classes, and data-attributes assignment.\n if (!highcharts) {\n return (\n <div {...rootProps}>\n <ChartContainer\n {...containerProps}\n chart={(minHeight) => (\n <div className={testClasses.fallback} style={{ minHeight }}>\n {fallback}\n </div>\n )}\n />\n </div>\n );\n }\n\n const apiOptions = api.getOptions();\n const inverted = !!options.chart?.inverted;\n const isRtl = getIsRtl(rootRef?.current);\n\n // The Highcharts options takes all provided Highcharts options and custom properties and merges them together, so that\n // the Cloudscape features and custom Highcharts extensions co-exist.\n // For certain options we provide Cloudscape styling, but in all cases this can be explicitly overridden.\n options = {\n ...options,\n // Hide credits by default.\n credits: options.credits ?? { enabled: false },\n // Hide chart title by default.\n title: options.title ?? { text: \"\" },\n // Use Cloudscape color palette by default.\n // This cannot be reset to Highcharts' default from the outside, but it is possible to provide custom palette.\n colors: options.colors ?? Styles.colors,\n chart: {\n // Animations are disabled by default.\n // This is done for UX and a11y reasons as Highcharts animations do not match our animation timings, and do\n // not respect disabled motion settings. These issues can likely be resolved or we can provide custom animations\n // instead, but this is not a priority.\n animation: false,\n ...Styles.chart,\n ...options.chart,\n className: clsx(testClasses[\"chart-plot\"], options.chart?.className),\n // The debug errors are enabled by default in development mode, but this only works\n // if the Highcharts debugger module is loaded.\n displayErrors: options.chart?.displayErrors ?? isDevelopment,\n style: { ...Styles.chartPlotCss, ...options.chart?.style },\n },\n series: options.series,\n // Highcharts legend is disabled by default in favour of the custom Cloudscape legend.\n legend: options.legend ?? { enabled: false },\n lang: {\n ...options.lang,\n accessibility: {\n // The default chart title is disabled by default to prevent the default \"Chart\" in the screen-reader detail.\n defaultChartTitle: \"\",\n chartContainerLabel: labels.chartLabel,\n svgContainerLabel: labels.chartContainerLabel,\n // We used {names[0]} to inject the axis title, see: https://api.highcharts.com/highcharts/lang.accessibility.axis.xAxisDescriptionSingular.\n axis: {\n xAxisDescriptionSingular: labels.chartXAxisLabel ? `${labels.chartXAxisLabel}, {names[0]}` : undefined,\n yAxisDescriptionSingular: labels.chartYAxisLabel ? `${labels.chartYAxisLabel}, {names[0]}` : undefined,\n },\n ...options.lang?.accessibility,\n },\n },\n accessibility: {\n description: labels.chartDescription,\n screenReaderSection: {\n // We use custom before-message to remove detail that are currently not supported with our i18n.\n // See: https://api.highcharts.com/highcharts/accessibility.screenReaderSection.beforeChartFormat.\n beforeChartFormat: \"<div>{xAxisDescription}</div><div>{yAxisDescription}</div>\",\n // We hide after message as it is currently not supported with our i18n.\n afterChartFormat: \"\",\n },\n ...options.accessibility,\n // Highcharts keyboard navigation is disabled by default in favour of the custom Cloudscape navigation.\n keyboardNavigation: options.accessibility?.keyboardNavigation ?? { enabled: !keyboardNavigation },\n point: {\n // Point description formatter is overridden to respect custom axes value formatters.\n descriptionFormatter: (point) =>\n getPointAccessibleDescription(point, labels, {\n sizeAxis: castArray(rest.sizeAxis as CoreChartProps.SizeAxisOptions[]),\n }),\n ...options.accessibility?.point,\n },\n },\n // We use the rtl adjusted axes (instead of the original options.xAxis/yAxis) to ensure the chart renders\n // with the correct axis orientation for RTL layouts, matching what was used for legend positioning above.\n xAxis: castArray(options.xAxis)?.map((xAxisOptions) => ({\n ...Styles.xAxisOptions,\n ...xAxisOptions,\n // Depending on the chart.inverted the x-axis can be rendered as vertical, and needs to respect page direction.\n reversed: !inverted && isRtl ? !xAxisOptions.reversed : xAxisOptions.reversed,\n opposite: inverted && isRtl ? !xAxisOptions.opposite : xAxisOptions.opposite,\n className: xAxisClassName(inverted, xAxisOptions.className),\n title: axisTitle(xAxisOptions.title ?? {}, !inverted || verticalAxisTitlePlacement === \"side\"),\n labels: axisLabels(xAxisOptions.labels ?? {}),\n })),\n yAxis: castArray(options.yAxis)?.map((yAxisOptions) => ({\n ...Styles.yAxisOptions,\n ...yAxisOptions,\n // Depending on the chart.inverted the y-axis can be rendered as vertical, and needs to respect page direction.\n reversed: inverted && isRtl ? !yAxisOptions.reversed : yAxisOptions.reversed,\n opposite: !inverted && isRtl ? !yAxisOptions.opposite : yAxisOptions.opposite,\n className: yAxisClassName(inverted, yAxisOptions.className, yAxisOptions.id),\n title: axisTitle(yAxisOptions.title ?? {}, inverted || verticalAxisTitlePlacement === \"side\"),\n labels: axisLabels(yAxisOptions.labels ?? {}),\n plotLines: yAxisPlotLines(yAxisOptions.plotLines, emphasizeBaseline),\n // We use reversed stack by default so that the order of points in the tooltip and series in the legend\n // correspond the order of stacks.\n reversedStacks: yAxisOptions.reversedStacks ?? true,\n })),\n plotOptions: {\n ...options.plotOptions,\n series: {\n // Animations are disabled by default, same as in the options.chart.\n animation: false,\n // Sticky tracking is disabled by default due to sub-optimal UX in dense charts.\n stickyTracking: false,\n borderColor: Styles.seriesBorderColor,\n ...options.plotOptions?.series,\n dataLabels: { style: Styles.seriesDataLabelsCss, ...options.plotOptions?.series?.dataLabels },\n states: {\n ...options.plotOptions?.series?.states,\n inactive: { opacity: Styles.seriesOpacityInactive, ...options.plotOptions?.series?.states?.inactive },\n },\n },\n area: { ...Styles.areaSeries, ...options.plotOptions?.area },\n areaspline: { ...Styles.areaSeries, ...options.plotOptions?.areaspline },\n arearange: { ...Styles.areaSeries, ...options.plotOptions?.arearange },\n areasplinerange: { ...Styles.areaSeries, ...options.plotOptions?.areasplinerange },\n line: { ...Styles.lineSeries, ...options.plotOptions?.line },\n spline: { ...Styles.lineSeries, ...options.plotOptions?.spline },\n column: { ...Styles.columnSeries, ...options.plotOptions?.column },\n errorbar: { ...Styles.errorbarSeries, ...options.plotOptions?.errorbar },\n // Pie chart is shown in legend by default, that is required for standalone pie charts.\n pie: {\n showInLegend: true,\n ...Styles.pieSeries,\n ...options.plotOptions?.pie,\n dataLabels: { ...Styles.pieSeriesDataLabels, ...options.plotOptions?.pie?.dataLabels },\n },\n },\n // We don't use Highcharts tooltip, but certain tooltip options such as tooltip.snap or tooltip.shared\n // affect the hovering behavior of Highcharts. That is only the case when the tooltip is not disabled,\n // so we render it, but hide with styles.\n tooltip: options.tooltip ?? { enabled: true, snap: Styles.tooltipSnap, style: { opacity: 0 } },\n };\n\n const legendProps = getLegendsProps(options, legendOptions);\n\n return (\n <div {...rootProps}>\n <ChartContainer\n {...containerProps}\n chart={(height) => {\n // We declare event handlers here to ensure that no event fires until the chart is initialized.\n const highchartsOptions: Highcharts.Options = {\n ...options,\n chart: {\n ...options.chart,\n // Use height computed from chartHeight, chartMinHeight, and fitHeight settings by default.\n // It is possible to override it by explicitly providing chart.height, but this will not be\n // compatible with any of the above settings.\n height: options.chart?.height ?? height,\n // We override certain chart events to inject additional behaviors, but it is still possible to define\n // custom callbacks. The Cloudscape behaviors can be disabled or altered via components API. For instance,\n // if no-data props are not provided - the related on-render computations will be skipped.\n events: {\n ...options.chart?.events,\n load(event) {\n apiOptions.onChartLoad.call(this, event);\n return options.chart?.events?.load?.call(this, event);\n },\n render(event) {\n apiOptions.onChartRender.call(this, event);\n return options.chart?.events?.render?.call(this, event);\n },\n click(event) {\n apiOptions.onChartClick.call(this, event);\n return options.chart?.events?.click?.call(this, event);\n },\n },\n },\n plotOptions: {\n ...options.plotOptions,\n series: {\n ...options.plotOptions?.series,\n // We override certain point events to inject additional behaviors, but it is still possible to define\n // custom callbacks. The Cloudscape behaviors can be disabled or altered via components API.\n point: {\n ...options.plotOptions?.series?.point,\n events: {\n ...options.plotOptions?.series?.point?.events,\n mouseOver(event) {\n apiOptions.onSeriesPointMouseOver.call(this, event);\n return options.plotOptions?.series?.point?.events?.mouseOver?.call(this, event);\n },\n mouseOut(event) {\n apiOptions.onSeriesPointMouseOut.call(this, event);\n return options.plotOptions?.series?.point?.events?.mouseOut?.call(this, event);\n },\n click(event) {\n apiOptions.onSeriesPointClick.call(this, event);\n return options.plotOptions?.series?.point?.events?.click?.call(this, event);\n },\n },\n },\n },\n },\n };\n return (\n <>\n <ChartApplication api={api} keyboardNavigation={keyboardNavigation} ariaLabel={ariaLabel} />\n <HighchartsReact\n highcharts={highcharts}\n options={highchartsOptions}\n callback={(chart: Highcharts.Chart) =>\n callback?.({ chart, highcharts: highcharts as typeof Highcharts, ...api.publicApi })\n }\n />\n </>\n );\n }}\n navigator={navigator}\n primaryLegend={\n context.legendEnabled && legendProps.primary ? (\n <ChartLegend {...commonLegendProps} {...legendProps.primary} className={testClasses[\"legend-primary\"]} />\n ) : null\n }\n secondaryLegend={\n context.legendEnabled && legendProps.secondary ? (\n <ChartLegend\n {...commonLegendProps}\n {...legendProps.secondary}\n className={testClasses[\"legend-secondary\"]}\n />\n ) : null\n }\n verticalAxisTitle={\n verticalAxisTitlePlacement === \"top\" ? <VerticalAxisTitle api={api} inverted={!!inverted} /> : null\n }\n header={header?.content ? <ChartHeader>{header.content}</ChartHeader> : null}\n footer={footer?.content ? <ChartFooter>{footer.content}</ChartFooter> : null}\n filter={\n filter?.seriesFilter || filter?.additionalFilters ? (\n <ChartFilters\n api={api}\n seriesFilter={filter?.seriesFilter}\n additionalFilters={filter?.additionalFilters}\n i18nStrings={i18nStrings}\n />\n ) : null\n }\n noData={context.noDataEnabled && <ChartNoData {...noDataOptions} i18nStrings={i18nStrings} api={api} />}\n />\n\n {context.tooltipEnabled && (\n <ChartTooltip\n {...tooltipOptions}\n i18nStrings={i18nStrings}\n getTooltipContent={rest.getTooltipContent}\n sizeAxis={castArray(rest.sizeAxis as CoreChartProps.SizeAxisOptions[])}\n api={api}\n />\n )}\n </div>\n );\n}\n\nfunction xAxisClassName(inverted: boolean, customClassName?: string) {\n return clsx(\n testClasses[\"axis-x\"],\n inverted ? testClasses[\"axis-vertical\"] : testClasses[\"axis-horizontal\"],\n customClassName,\n );\n}\n\nfunction yAxisClassName(inverted: boolean, customClassName?: string, axisId?: string) {\n return clsx(\n testClasses[\"axis-y\"],\n inverted ? testClasses[\"axis-horizontal\"] : testClasses[\"axis-vertical\"],\n customClassName,\n axisId && `awsui-axis-${axisId}`,\n );\n}\n\n// When placing vertical axis title in the chart's top, the actual axis title rendered by Highcharts\n// needs to be visually hidden (it is still accessible by screen-readers). We then set title's\n// opacity to 0, and use reserveSpace=false, so that Highcharts stretches the plot area to all available\n// container width.\nfunction axisTitle<O extends Highcharts.XAxisTitleOptions | Highcharts.YAxisTitleOptions>(\n options: O,\n visible: boolean,\n): O {\n return {\n style: { ...Styles.axisTitleCss, opacity: visible ? undefined : 0 },\n reserveSpace: visible ? undefined : false,\n ...options,\n };\n}\n\n// We use custom formatters instead of Highcharts defaults to ensure consistent formatting\n// between axis ticks and tooltip contents.\nfunction axisLabels<O extends Highcharts.XAxisLabelsOptions | Highcharts.YAxisLabelsOptions>(options: O): O {\n return {\n style: Styles.axisLabelsCss,\n formatter: function () {\n const formattedValue = getFormatter(this.axis)(this.value);\n return formattedValue.replace(/\\n/g, \"<br />\");\n },\n ...options,\n };\n}\n\nfunction yAxisPlotLines(\n plotLineOptions: Highcharts.YAxisPlotLinesOptions[] = [],\n emphasizeBaseline: boolean,\n): Highcharts.YAxisPlotLinesOptions[] {\n return emphasizeBaseline\n ? [{ value: 0, ...Styles.chatPlotBaseline, className: testClasses[\"emphasized-baseline\"] }, ...plotLineOptions]\n : plotLineOptions;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"chart-core.js","sourceRoot":"","sources":["../../../src/core/chart-core.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAExD,OAAO,EACL,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,EACZ,WAAW,GACZ,MAAM,+CAA+C,CAAC;AACvD,OAAO,OAAO,MAAM,uCAAuC,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAEnF,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,YAAY,EA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AAE,CAAC,EAAE,GAAG,MAAM,CAAC,gBAAgB,EAAE,SAAS,EAAE,WAAW,CAAC,qBAAqB,CAAC,EAAE,EAAE,GAAG,eAAe,CAAC;QAC/G,CAAC,CAAC,eAAe,CAAC;AACtB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { useEffect, useRef } from \"react\";\nimport clsx from \"clsx\";\nimport type Highcharts from \"highcharts\";\nimport HighchartsReact from \"highcharts-react-official\";\n\nimport {\n getIsRtl,\n isDevelopment,\n KeyCode,\n useMergeRefs,\n useUniqueId,\n} from \"@cloudscape-design/component-toolkit/internal\";\nimport Spinner from \"@cloudscape-design/components/spinner\";\n\nimport { getDataAttributes } from \"../internal/base-component/get-data-attributes\";\nimport { InternalBaseComponentProps } from \"../internal/base-component/use-base-component\";\nimport * as Styles from \"../internal/chart-styles\";\nimport { castArray } from \"../internal/utils/utils\";\nimport { useChartAPI } from \"./chart-api\";\nimport { ChartExtraContext } from \"./chart-api/chart-extra-context\";\nimport { ChartContainer } from \"./chart-container\";\nimport { ChartApplication } from \"./components/core-application\";\nimport { ChartFilters } from \"./components/core-filters\";\nimport { ChartLegend } from \"./components/core-legend\";\nimport { ChartNoData } from \"./components/core-no-data\";\nimport { ChartFooter, ChartHeader } from \"./components/core-slots\";\nimport { ChartTooltip } from \"./components/core-tooltip\";\nimport { VerticalAxisTitle } from \"./components/core-vertical-axis-title\";\nimport { ChartZoomControls, ChartZoomLiveRegion } from \"./components/core-zoom\";\nimport { getFormatter } from \"./formatters\";\nimport { useChartI18n } from \"./i18n-utils\";\nimport { CoreChartProps } from \"./interfaces\";\nimport { InternalZoomProps } from \"./internal-interfaces\";\nimport { getLegendsProps, getPointAccessibleDescription } from \"./utils\";\n\nimport styles from \"./styles.css.js\";\nimport testClasses from \"./test-classes/styles.css.js\";\n\n/**\n * CoreChart is the core internal abstraction that accepts the entire set of Highcharts options along\n * with Cloudscape props to define custom tooltip, no-data, formatters, items visibility, and more.\n */\nexport function InternalCoreChart({\n options,\n ariaLabel,\n ariaDescription,\n fitHeight,\n chartHeight,\n chartMinHeight,\n chartMinWidth,\n tooltip: tooltipOptions,\n noData: noDataOptions,\n navigator,\n zoom: zoomOptions,\n zoomRange,\n onZoomRangeChange,\n legend: legendOptions,\n fallback = <Spinner />,\n callback,\n emphasizeBaseline = true,\n verticalAxisTitlePlacement = \"side\",\n i18nStrings,\n className,\n header,\n footer,\n filter,\n keyboardNavigation = true,\n onHighlight,\n onLegendItemHighlight,\n onClearHighlight,\n onVisibleItemsChange,\n visibleItems,\n __internalRootRef,\n getItemOptions,\n ...rest\n}: CoreChartProps & InternalBaseComponentProps & InternalZoomProps) {\n const highcharts = rest.highcharts as null | typeof Highcharts;\n const labels = useChartI18n({ ariaLabel, ariaDescription, i18nStrings });\n // The zoom applies to the first x-axis, and is ignored when the chart does not define one.\n const zoomEnabled = !!zoomOptions?.enabled && (castArray(options.xAxis)?.length ?? 0) > 0;\n const context: ChartExtraContext[\"settings\"] = {\n chartId: useUniqueId(),\n noDataEnabled: !!noDataOptions,\n legendEnabled: legendOptions?.enabled !== false,\n tooltipEnabled: tooltipOptions?.enabled !== false,\n keyboardNavigationEnabled: keyboardNavigation,\n labels,\n getItemOptions: getItemOptions ?? (() => ({})),\n zoomEnabled,\n };\n const handlers = { onHighlight, onClearHighlight, onVisibleItemsChange, onZoomRangeChange };\n const state = { visibleItems, zoomRange };\n const api = useChartAPI(context, handlers, state);\n\n const rootClassName = clsx(testClasses.root, styles.root, fitHeight && styles[\"root-fit-height\"], className);\n const rootRef = useRef<HTMLDivElement>(null);\n const mergedRootRef = useMergeRefs(rootRef, __internalRootRef);\n const rootProps = { ref: mergedRootRef, className: rootClassName, ...getDataAttributes(rest) };\n const legendPosition = legendOptions?.position ?? \"bottom\";\n const commonLegendProps = {\n api: api,\n i18nStrings,\n onItemHighlight: onLegendItemHighlight,\n getLegendTooltipContent: rest.getLegendTooltipContent,\n };\n const containerProps = {\n fitHeight,\n chartHeight,\n chartMinHeight,\n chartMinWidth,\n legendPosition,\n verticalAxisTitlePlacement,\n legendBottomMaxHeight: legendOptions?.bottomMaxHeight,\n };\n\n // AWSUI-61678\n // Add global Escape key listener to dismiss hover tooltips for WCAG Content on Hover/Focus compliance\n // This listener handles Escape when using mouse hover. When keyboard navigation is active (application\n // element is focused), the navigation handler deals with Escape, so we skip to avoid conflicts.\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n // Skip if keyboard navigation is handling this (event originated from application element)\n const target = event.target as Element;\n if (context.keyboardNavigationEnabled && target?.closest('[role=\"application\"]')) {\n return;\n }\n\n if (event.keyCode === KeyCode.escape && context.tooltipEnabled) {\n const tooltipState = api.tooltipStore.get();\n if (tooltipState.visible && !tooltipState.pinned) {\n api.hideTooltip();\n }\n }\n };\n\n document.addEventListener(\"keydown\", handleKeyDown);\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown);\n };\n }, [api, context.tooltipEnabled, context.keyboardNavigationEnabled]);\n\n // Render fallback using the same root and container props as for the chart to ensure consistent\n // size, test classes, and data-attributes assignment.\n if (!highcharts) {\n return (\n <div {...rootProps}>\n <ChartContainer\n {...containerProps}\n chart={(minHeight) => (\n <div className={testClasses.fallback} style={{ minHeight }}>\n {fallback}\n </div>\n )}\n />\n </div>\n );\n }\n\n const apiOptions = api.getOptions();\n const inverted = !!options.chart?.inverted;\n const isRtl = getIsRtl(rootRef?.current);\n\n // The Highcharts options takes all provided Highcharts options and custom properties and merges them together, so that\n // the Cloudscape features and custom Highcharts extensions co-exist.\n // For certain options we provide Cloudscape styling, but in all cases this can be explicitly overridden.\n options = {\n ...options,\n // Hide credits by default.\n credits: options.credits ?? { enabled: false },\n // Hide chart title by default.\n title: options.title ?? { text: \"\" },\n // Use Cloudscape color palette by default.\n // This cannot be reset to Highcharts' default from the outside, but it is possible to provide custom palette.\n colors: options.colors ?? Styles.colors,\n chart: {\n // Animations are disabled by default.\n // This is done for UX and a11y reasons as Highcharts animations do not match our animation timings, and do\n // not respect disabled motion settings. These issues can likely be resolved or we can provide custom animations\n // instead, but this is not a priority.\n animation: false,\n ...Styles.chart,\n ...options.chart,\n className: clsx(testClasses[\"chart-plot\"], options.chart?.className),\n // The debug errors are enabled by default in development mode, but this only works\n // if the Highcharts debugger module is loaded.\n displayErrors: options.chart?.displayErrors ?? isDevelopment,\n style: { ...Styles.chartPlotCss, ...options.chart?.style },\n },\n series: options.series,\n // Highcharts legend is disabled by default in favour of the custom Cloudscape legend.\n legend: options.legend ?? { enabled: false },\n lang: {\n ...options.lang,\n accessibility: {\n // The default chart title is disabled by default to prevent the default \"Chart\" in the screen-reader detail.\n defaultChartTitle: \"\",\n chartContainerLabel: labels.chartLabel,\n svgContainerLabel: labels.chartContainerLabel,\n // We used {names[0]} to inject the axis title, see: https://api.highcharts.com/highcharts/lang.accessibility.axis.xAxisDescriptionSingular.\n axis: {\n xAxisDescriptionSingular: labels.chartXAxisLabel ? `${labels.chartXAxisLabel}, {names[0]}` : undefined,\n yAxisDescriptionSingular: labels.chartYAxisLabel ? `${labels.chartYAxisLabel}, {names[0]}` : undefined,\n },\n ...options.lang?.accessibility,\n },\n },\n accessibility: {\n description: labels.chartDescription,\n screenReaderSection: {\n // We use custom before-message to remove detail that are currently not supported with our i18n.\n // See: https://api.highcharts.com/highcharts/accessibility.screenReaderSection.beforeChartFormat.\n beforeChartFormat: \"<div>{xAxisDescription}</div><div>{yAxisDescription}</div>\",\n // We hide after message as it is currently not supported with our i18n.\n afterChartFormat: \"\",\n },\n ...options.accessibility,\n // Highcharts keyboard navigation is disabled by default in favour of the custom Cloudscape navigation.\n keyboardNavigation: options.accessibility?.keyboardNavigation ?? { enabled: !keyboardNavigation },\n point: {\n // Point description formatter is overridden to respect custom axes value formatters.\n descriptionFormatter: (point) =>\n getPointAccessibleDescription(point, labels, {\n sizeAxis: castArray(rest.sizeAxis as CoreChartProps.SizeAxisOptions[]),\n }),\n ...options.accessibility?.point,\n },\n },\n // We use the rtl adjusted axes (instead of the original options.xAxis/yAxis) to ensure the chart renders\n // with the correct axis orientation for RTL layouts, matching what was used for legend positioning above.\n xAxis: castArray(options.xAxis)?.map((xAxisOptions, index) => ({\n ...Styles.xAxisOptions,\n // Highcharts widens any range narrower than five times the closest point distance unless the axis declares\n // a minRange, and reads zero as not declared. The smallest positive number lets the zoom show any range.\n ...(index === 0 && zoomEnabled ? { minRange: Number.MIN_VALUE } : {}),\n ...xAxisOptions,\n // Depending on the chart.inverted the x-axis can be rendered as vertical, and needs to respect page direction.\n reversed: !inverted && isRtl ? !xAxisOptions.reversed : xAxisOptions.reversed,\n opposite: inverted && isRtl ? !xAxisOptions.opposite : xAxisOptions.opposite,\n className: xAxisClassName(inverted, xAxisOptions.className),\n title: axisTitle(xAxisOptions.title ?? {}, !inverted || verticalAxisTitlePlacement === \"side\"),\n labels: axisLabels(xAxisOptions.labels ?? {}),\n })),\n yAxis: castArray(options.yAxis)?.map((yAxisOptions) => ({\n ...Styles.yAxisOptions,\n ...yAxisOptions,\n // Depending on the chart.inverted the y-axis can be rendered as vertical, and needs to respect page direction.\n reversed: inverted && isRtl ? !yAxisOptions.reversed : yAxisOptions.reversed,\n opposite: !inverted && isRtl ? !yAxisOptions.opposite : yAxisOptions.opposite,\n className: yAxisClassName(inverted, yAxisOptions.className, yAxisOptions.id),\n title: axisTitle(yAxisOptions.title ?? {}, inverted || verticalAxisTitlePlacement === \"side\"),\n labels: axisLabels(yAxisOptions.labels ?? {}),\n plotLines: yAxisPlotLines(yAxisOptions.plotLines, emphasizeBaseline),\n // We use reversed stack by default so that the order of points in the tooltip and series in the legend\n // correspond the order of stacks.\n reversedStacks: yAxisOptions.reversedStacks ?? true,\n })),\n plotOptions: {\n ...options.plotOptions,\n series: {\n // Animations are disabled by default, same as in the options.chart.\n animation: false,\n // Sticky tracking is disabled by default due to sub-optimal UX in dense charts.\n stickyTracking: false,\n borderColor: Styles.seriesBorderColor,\n ...options.plotOptions?.series,\n dataLabels: { style: Styles.seriesDataLabelsCss, ...options.plotOptions?.series?.dataLabels },\n states: {\n ...options.plotOptions?.series?.states,\n inactive: { opacity: Styles.seriesOpacityInactive, ...options.plotOptions?.series?.states?.inactive },\n },\n },\n area: { ...Styles.areaSeries, ...options.plotOptions?.area },\n areaspline: { ...Styles.areaSeries, ...options.plotOptions?.areaspline },\n arearange: { ...Styles.areaSeries, ...options.plotOptions?.arearange },\n areasplinerange: { ...Styles.areaSeries, ...options.plotOptions?.areasplinerange },\n line: { ...Styles.lineSeries, ...options.plotOptions?.line },\n spline: { ...Styles.lineSeries, ...options.plotOptions?.spline },\n column: { ...Styles.columnSeries, ...options.plotOptions?.column },\n errorbar: { ...Styles.errorbarSeries, ...options.plotOptions?.errorbar },\n // Pie chart is shown in legend by default, that is required for standalone pie charts.\n pie: {\n showInLegend: true,\n ...Styles.pieSeries,\n ...options.plotOptions?.pie,\n dataLabels: { ...Styles.pieSeriesDataLabels, ...options.plotOptions?.pie?.dataLabels },\n },\n },\n // We don't use Highcharts tooltip, but certain tooltip options such as tooltip.snap or tooltip.shared\n // affect the hovering behavior of Highcharts. That is only the case when the tooltip is not disabled,\n // so we render it, but hide with styles.\n tooltip: options.tooltip ?? { enabled: true, snap: Styles.tooltipSnap, style: { opacity: 0 } },\n };\n\n const legendProps = getLegendsProps(options, legendOptions);\n\n return (\n <div {...rootProps}>\n <ChartContainer\n {...containerProps}\n chart={(height) => {\n // We declare event handlers here to ensure that no event fires until the chart is initialized.\n const highchartsOptions: Highcharts.Options = {\n ...options,\n chart: {\n ...options.chart,\n // Use height computed from chartHeight, chartMinHeight, and fitHeight settings by default.\n // It is possible to override it by explicitly providing chart.height, but this will not be\n // compatible with any of the above settings.\n height: options.chart?.height ?? height,\n // We override certain chart events to inject additional behaviors, but it is still possible to define\n // custom callbacks. The Cloudscape behaviors can be disabled or altered via components API. For instance,\n // if no-data props are not provided - the related on-render computations will be skipped.\n events: {\n ...options.chart?.events,\n load(event) {\n apiOptions.onChartLoad.call(this, event);\n return options.chart?.events?.load?.call(this, event);\n },\n render(event) {\n apiOptions.onChartRender.call(this, event);\n return options.chart?.events?.render?.call(this, event);\n },\n click(event) {\n apiOptions.onChartClick.call(this, event);\n return options.chart?.events?.click?.call(this, event);\n },\n },\n },\n plotOptions: {\n ...options.plotOptions,\n series: {\n ...options.plotOptions?.series,\n // We override certain point events to inject additional behaviors, but it is still possible to define\n // custom callbacks. The Cloudscape behaviors can be disabled or altered via components API.\n point: {\n ...options.plotOptions?.series?.point,\n events: {\n ...options.plotOptions?.series?.point?.events,\n mouseOver(event) {\n apiOptions.onSeriesPointMouseOver.call(this, event);\n return options.plotOptions?.series?.point?.events?.mouseOver?.call(this, event);\n },\n mouseOut(event) {\n apiOptions.onSeriesPointMouseOut.call(this, event);\n return options.plotOptions?.series?.point?.events?.mouseOut?.call(this, event);\n },\n click(event) {\n apiOptions.onSeriesPointClick.call(this, event);\n return options.plotOptions?.series?.point?.events?.click?.call(this, event);\n },\n },\n },\n },\n },\n };\n return (\n <>\n <ChartApplication api={api} keyboardNavigation={keyboardNavigation} ariaLabel={ariaLabel} />\n <HighchartsReact\n highcharts={highcharts}\n options={highchartsOptions}\n callback={(chart: Highcharts.Chart) =>\n callback?.({ chart, highcharts: highcharts as typeof Highcharts, ...api.publicApi })\n }\n />\n </>\n );\n }}\n zoomControls={\n zoomEnabled && !zoomOptions?.hideZoomControls ? <ChartZoomControls api={api} labels={labels} /> : null\n }\n navigator={navigator}\n primaryLegend={\n context.legendEnabled && legendProps.primary ? (\n <ChartLegend {...commonLegendProps} {...legendProps.primary} className={testClasses[\"legend-primary\"]} />\n ) : null\n }\n secondaryLegend={\n context.legendEnabled && legendProps.secondary ? (\n <ChartLegend\n {...commonLegendProps}\n {...legendProps.secondary}\n className={testClasses[\"legend-secondary\"]}\n />\n ) : null\n }\n verticalAxisTitle={\n verticalAxisTitlePlacement === \"top\" ? <VerticalAxisTitle api={api} inverted={!!inverted} /> : null\n }\n header={header?.content ? <ChartHeader>{header.content}</ChartHeader> : null}\n footer={footer?.content ? <ChartFooter>{footer.content}</ChartFooter> : null}\n filter={\n filter?.seriesFilter || filter?.additionalFilters ? (\n <ChartFilters\n api={api}\n seriesFilter={filter?.seriesFilter}\n additionalFilters={filter?.additionalFilters}\n i18nStrings={i18nStrings}\n />\n ) : null\n }\n noData={context.noDataEnabled && <ChartNoData {...noDataOptions} i18nStrings={i18nStrings} api={api} />}\n />\n\n {context.tooltipEnabled && (\n <ChartTooltip\n {...tooltipOptions}\n i18nStrings={i18nStrings}\n getTooltipContent={rest.getTooltipContent}\n sizeAxis={castArray(rest.sizeAxis as CoreChartProps.SizeAxisOptions[])}\n api={api}\n />\n )}\n\n {zoomEnabled && <ChartZoomLiveRegion api={api} />}\n </div>\n );\n}\n\nfunction xAxisClassName(inverted: boolean, customClassName?: string) {\n return clsx(\n testClasses[\"axis-x\"],\n inverted ? testClasses[\"axis-vertical\"] : testClasses[\"axis-horizontal\"],\n customClassName,\n );\n}\n\nfunction yAxisClassName(inverted: boolean, customClassName?: string, axisId?: string) {\n return clsx(\n testClasses[\"axis-y\"],\n inverted ? testClasses[\"axis-horizontal\"] : testClasses[\"axis-vertical\"],\n customClassName,\n axisId && `awsui-axis-${axisId}`,\n );\n}\n\n// When placing vertical axis title in the chart's top, the actual axis title rendered by Highcharts\n// needs to be visually hidden (it is still accessible by screen-readers). We then set title's\n// opacity to 0, and use reserveSpace=false, so that Highcharts stretches the plot area to all available\n// container width.\nfunction axisTitle<O extends Highcharts.XAxisTitleOptions | Highcharts.YAxisTitleOptions>(\n options: O,\n visible: boolean,\n): O {\n return {\n style: { ...Styles.axisTitleCss, opacity: visible ? undefined : 0 },\n reserveSpace: visible ? undefined : false,\n ...options,\n };\n}\n\n// We use custom formatters instead of Highcharts defaults to ensure consistent formatting\n// between axis ticks and tooltip contents.\nfunction axisLabels<O extends Highcharts.XAxisLabelsOptions | Highcharts.YAxisLabelsOptions>(options: O): O {\n return {\n style: Styles.axisLabelsCss,\n formatter: function () {\n const formattedValue = getFormatter(this.axis)(this.value);\n return formattedValue.replace(/\\n/g, \"<br />\");\n },\n ...options,\n };\n}\n\nfunction yAxisPlotLines(\n plotLineOptions: Highcharts.YAxisPlotLinesOptions[] = [],\n emphasizeBaseline: boolean,\n): Highcharts.YAxisPlotLinesOptions[] {\n return emphasizeBaseline\n ? [{ value: 0, ...Styles.chatPlotBaseline, className: testClasses[\"emphasized-baseline\"] }, ...plotLineOptions]\n : plotLineOptions;\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChartAPI } from "../chart-api";
|
|
2
|
+
import { ChartLabels } from "../i18n-utils";
|
|
3
|
+
export declare function ChartZoomControls({ api, labels }: {
|
|
4
|
+
api: ChartAPI;
|
|
5
|
+
labels: ChartLabels;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export declare function ChartZoomLiveRegion({ api }: {
|
|
8
|
+
api: ChartAPI;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
import Button from "@cloudscape-design/components/button";
|
|
5
|
+
import LiveRegion from "@cloudscape-design/components/live-region";
|
|
6
|
+
import { useSelector } from "../../internal/utils/async-store";
|
|
7
|
+
import styles from "../styles.css.js";
|
|
8
|
+
import testClasses from "../test-classes/styles.css.js";
|
|
9
|
+
export function ChartZoomControls({ api, labels }) {
|
|
10
|
+
const zoomed = useSelector(api.zoomStore, (s) => s.zoomed);
|
|
11
|
+
if (!zoomed) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
return (_jsx("div", { role: "region", "aria-label": labels.zoomControlsAriaLabel, className: styles["chart-zoom-controls"], children: _jsx(Button, { variant: "link", formAction: "none", onClick: api.resetZoom, ariaLabel: labels.resetZoomButtonAriaLabel, className: testClasses["reset-zoom-button"], children: labels.resetZoomButtonText }) }));
|
|
15
|
+
}
|
|
16
|
+
export function ChartZoomLiveRegion({ api }) {
|
|
17
|
+
const announcement = useSelector(api.zoomStore, (s) => s.announcement);
|
|
18
|
+
return _jsx(LiveRegion, { hidden: true, children: announcement });
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=core-zoom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-zoom.js","sourceRoot":"","sources":["../../../../src/core/components/core-zoom.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,MAAM,MAAM,sCAAsC,CAAC;AAC1D,OAAO,UAAU,MAAM,2CAA2C,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAI/D,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,WAAW,MAAM,+BAA+B,CAAC;AAExD,MAAM,UAAU,iBAAiB,CAAC,EAAE,GAAG,EAAE,MAAM,EAA0C;IACvF,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC3D,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CACL,cAAK,IAAI,EAAC,QAAQ,gBAAa,MAAM,CAAC,qBAAqB,EAAE,SAAS,EAAE,MAAM,CAAC,qBAAqB,CAAC,YACnG,KAAC,MAAM,IACL,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,MAAM,EACjB,OAAO,EAAE,GAAG,CAAC,SAAS,EACtB,SAAS,EAAE,MAAM,CAAC,wBAAwB,EAC1C,SAAS,EAAE,WAAW,CAAC,mBAAmB,CAAC,YAE1C,MAAM,CAAC,mBAAmB,GACpB,GACL,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,EAAE,GAAG,EAAqB;IAC5D,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IACvE,OAAO,KAAC,UAAU,IAAC,MAAM,EAAE,IAAI,YAAG,YAAY,GAAc,CAAC;AAC/D,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport Button from \"@cloudscape-design/components/button\";\nimport LiveRegion from \"@cloudscape-design/components/live-region\";\n\nimport { useSelector } from \"../../internal/utils/async-store\";\nimport { ChartAPI } from \"../chart-api\";\nimport { ChartLabels } from \"../i18n-utils\";\n\nimport styles from \"../styles.css.js\";\nimport testClasses from \"../test-classes/styles.css.js\";\n\nexport function ChartZoomControls({ api, labels }: { api: ChartAPI; labels: ChartLabels }) {\n const zoomed = useSelector(api.zoomStore, (s) => s.zoomed);\n if (!zoomed) {\n return null;\n }\n return (\n <div role=\"region\" aria-label={labels.zoomControlsAriaLabel} className={styles[\"chart-zoom-controls\"]}>\n <Button\n variant=\"link\"\n formAction=\"none\"\n onClick={api.resetZoom}\n ariaLabel={labels.resetZoomButtonAriaLabel}\n className={testClasses[\"reset-zoom-button\"]}\n >\n {labels.resetZoomButtonText}\n </Button>\n </div>\n );\n}\n\nexport function ChartZoomLiveRegion({ api }: { api: ChartAPI }) {\n const announcement = useSelector(api.zoomStore, (s) => s.announcement);\n return <LiveRegion hidden={true}>{announcement}</LiveRegion>;\n}\n"]}
|
package/core/i18n-utils.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ export interface ChartLabels {
|
|
|
8
8
|
chartYAxisLabel?: string;
|
|
9
9
|
chartSegmentLabel?: string;
|
|
10
10
|
itemMarkerLabel?: (status?: ChartSeriesMarkerStatus) => string | undefined;
|
|
11
|
+
resetZoomButtonText?: string;
|
|
12
|
+
resetZoomButtonAriaLabel?: string;
|
|
13
|
+
zoomControlsAriaLabel?: string;
|
|
14
|
+
zoomResetAnnouncementText?: string;
|
|
11
15
|
}
|
|
12
16
|
export declare function useChartI18n({ ariaLabel, ariaDescription, i18nStrings, }: {
|
|
13
17
|
ariaLabel?: string;
|
package/core/i18n-utils.js
CHANGED
|
@@ -4,6 +4,8 @@ import { useInternalI18n } from "@cloudscape-design/components/internal/do-not-u
|
|
|
4
4
|
export function useChartI18n({ ariaLabel, ariaDescription, i18nStrings, }) {
|
|
5
5
|
const i18n = useInternalI18n("[charts]");
|
|
6
6
|
const i18nPie = useInternalI18n("pie-chart");
|
|
7
|
+
// The zoom messages are not part of the typed "[charts]" namespace of the components package yet.
|
|
8
|
+
const i18nZoom = i18n;
|
|
7
9
|
return {
|
|
8
10
|
chartLabel: ariaLabel,
|
|
9
11
|
chartDescription: ariaDescription,
|
|
@@ -13,6 +15,10 @@ export function useChartI18n({ ariaLabel, ariaDescription, i18nStrings, }) {
|
|
|
13
15
|
chartXAxisLabel: i18n("i18nStrings.xAxisAriaRoleDescription", i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.xAxisRoleDescription),
|
|
14
16
|
chartYAxisLabel: i18n("i18nStrings.yAxisAriaRoleDescription", i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.yAxisRoleDescription),
|
|
15
17
|
chartSegmentLabel: i18nPie("i18nStrings.segmentAriaRoleDescription", i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.segmentRoleDescription),
|
|
18
|
+
resetZoomButtonText: i18nZoom("i18nStrings.resetZoomButtonText", undefined),
|
|
19
|
+
resetZoomButtonAriaLabel: i18nZoom("i18nStrings.resetZoomButtonAriaLabel", undefined),
|
|
20
|
+
zoomControlsAriaLabel: i18nZoom("i18nStrings.zoomControlsAriaLabel", undefined),
|
|
21
|
+
zoomResetAnnouncementText: i18nZoom("i18nStrings.zoomResetAnnouncementText", undefined),
|
|
16
22
|
itemMarkerLabel: (status = "default") => {
|
|
17
23
|
var _a;
|
|
18
24
|
switch (status) {
|
package/core/i18n-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-utils.js","sourceRoot":"","sources":["../../../src/core/i18n-utils.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;
|
|
1
|
+
{"version":3,"file":"i18n-utils.js","sourceRoot":"","sources":["../../../src/core/i18n-utils.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AAmBzF,MAAM,UAAU,YAAY,CAAC,EAC3B,SAAS,EACT,eAAe,EACf,WAAW,GAKZ;IACC,MAAM,IAAI,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;IAC7C,kGAAkG;IAClG,MAAM,QAAQ,GAAG,IAAwE,CAAC;IAC1F,OAAO;QACL,UAAU,EAAE,SAAS;QACrB,gBAAgB,EAAE,eAAe;QACjC,2GAA2G;QAC3G,8CAA8C;QAC9C,mBAAmB,EAAE,IAAI,CAAC,sCAAsC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,oBAAoB,CAAC;QACpG,eAAe,EAAE,IAAI,CAAC,sCAAsC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,oBAAoB,CAAC;QAChG,eAAe,EAAE,IAAI,CAAC,sCAAsC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,oBAAoB,CAAC;QAChG,iBAAiB,EAAE,OAAO,CAAC,wCAAwC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,sBAAsB,CAAC;QACzG,mBAAmB,EAAE,QAAQ,CAAC,iCAAiC,EAAE,SAAS,CAAC;QAC3E,wBAAwB,EAAE,QAAQ,CAAC,sCAAsC,EAAE,SAAS,CAAC;QACrF,qBAAqB,EAAE,QAAQ,CAAC,mCAAmC,EAAE,SAAS,CAAC;QAC/E,yBAAyB,EAAE,QAAQ,CAAC,uCAAuC,EAAE,SAAS,CAAC;QACvF,eAAe,EAAE,CAAC,MAAM,GAAG,SAAS,EAAE,EAAE;;YACtC,QAAQ,MAAM,EAAE,CAAC;gBACf,KAAK,SAAS;oBACZ,OAAO,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,yBAAyB,4DAAG,MAAM,CAAC,CAAC;gBAC1D;oBACE,OAAO,SAAS,CAAC;YACrB,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { useInternalI18n } from \"@cloudscape-design/components/internal/do-not-use/i18n\";\n\nimport { ChartSeriesMarkerStatus } from \"../internal/components/series-marker/interfaces\";\nimport { CoreChartProps } from \"./interfaces\";\n\nexport interface ChartLabels {\n chartLabel?: string;\n chartDescription?: string;\n chartContainerLabel?: string;\n chartXAxisLabel?: string;\n chartYAxisLabel?: string;\n chartSegmentLabel?: string;\n itemMarkerLabel?: (status?: ChartSeriesMarkerStatus) => string | undefined;\n resetZoomButtonText?: string;\n resetZoomButtonAriaLabel?: string;\n zoomControlsAriaLabel?: string;\n zoomResetAnnouncementText?: string;\n}\n\nexport function useChartI18n({\n ariaLabel,\n ariaDescription,\n i18nStrings,\n}: {\n ariaLabel?: string;\n ariaDescription?: string;\n i18nStrings?: CoreChartProps.I18nStrings;\n}): ChartLabels {\n const i18n = useInternalI18n(\"[charts]\");\n const i18nPie = useInternalI18n(\"pie-chart\");\n // The zoom messages are not part of the typed \"[charts]\" namespace of the components package yet.\n const i18nZoom = i18n as unknown as (key: string, value: undefined) => undefined | string;\n return {\n chartLabel: ariaLabel,\n chartDescription: ariaDescription,\n // We reuse existing translations as passing for now, but it is possible to introduce new i18n strings that\n // are parametrized with axes names, and more.\n chartContainerLabel: i18n(\"i18nStrings.chartAriaRoleDescription\", i18nStrings?.chartRoleDescription),\n chartXAxisLabel: i18n(\"i18nStrings.xAxisAriaRoleDescription\", i18nStrings?.xAxisRoleDescription),\n chartYAxisLabel: i18n(\"i18nStrings.yAxisAriaRoleDescription\", i18nStrings?.yAxisRoleDescription),\n chartSegmentLabel: i18nPie(\"i18nStrings.segmentAriaRoleDescription\", i18nStrings?.segmentRoleDescription),\n resetZoomButtonText: i18nZoom(\"i18nStrings.resetZoomButtonText\", undefined),\n resetZoomButtonAriaLabel: i18nZoom(\"i18nStrings.resetZoomButtonAriaLabel\", undefined),\n zoomControlsAriaLabel: i18nZoom(\"i18nStrings.zoomControlsAriaLabel\", undefined),\n zoomResetAnnouncementText: i18nZoom(\"i18nStrings.zoomResetAnnouncementText\", undefined),\n itemMarkerLabel: (status = \"default\") => {\n switch (status) {\n case \"warning\":\n return i18nStrings?.itemMarkerStatusAriaLabel?.(status);\n default:\n return undefined;\n }\n },\n };\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { NonCancelableEventHandler } from "../internal/events";
|
|
2
|
+
export interface ZoomOptions {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
hideZoomControls?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface ZoomRange {
|
|
7
|
+
x?: {
|
|
8
|
+
startValue: number;
|
|
9
|
+
endValue: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface ZoomChangeDetail {
|
|
13
|
+
zoomRange: ZoomRange | null;
|
|
14
|
+
}
|
|
15
|
+
export interface InternalZoomProps {
|
|
16
|
+
zoom?: ZoomOptions;
|
|
17
|
+
zoomRange?: ZoomRange | null;
|
|
18
|
+
onZoomRangeChange?: NonCancelableEventHandler<ZoomChangeDetail>;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-interfaces.js","sourceRoot":"","sources":["../../../src/core/internal-interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { NonCancelableEventHandler } from \"../internal/events\";\n\nexport interface ZoomOptions {\n enabled?: boolean;\n hideZoomControls?: boolean;\n}\n\n// The range is nested under the axis it applies to, leaving room for a \"y\" range should zooming\n// along the y-axis be supported later, without a breaking change to the property shape.\nexport interface ZoomRange {\n x?: { startValue: number; endValue: number };\n}\n\nexport interface ZoomChangeDetail {\n zoomRange: ZoomRange | null;\n}\n\n// The zoom properties accepted by the internal core chart. They are not part of any public component\n// interface yet.\nexport interface InternalZoomProps {\n zoom?: ZoomOptions;\n zoomRange?: ZoomRange | null;\n onZoomRangeChange?: NonCancelableEventHandler<ZoomChangeDetail>;\n}\n"]}
|
package/core/styles.css.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"highcharts-grid-line": "awsui_highcharts-grid-
|
|
6
|
-
"root-fit-height": "awsui_root-fit-
|
|
7
|
-
"no-data-container": "awsui_no-data-
|
|
8
|
-
"no-data": "awsui_no-
|
|
9
|
-
"no-data-wrapper": "awsui_no-data-
|
|
10
|
-
"no-data-empty": "awsui_no-data-
|
|
11
|
-
"chart-
|
|
12
|
-
"chart-filters
|
|
13
|
-
"
|
|
14
|
-
"axis-vertical-title
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"chart-container-
|
|
19
|
-
"chart-container-
|
|
20
|
-
"chart-
|
|
21
|
-
"chart-plot-wrapper": "awsui_chart-plot-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
4
|
+
"root": "awsui_root_113qp_q10sj_5",
|
|
5
|
+
"highcharts-grid-line": "awsui_highcharts-grid-line_113qp_q10sj_8",
|
|
6
|
+
"root-fit-height": "awsui_root-fit-height_113qp_q10sj_12",
|
|
7
|
+
"no-data-container": "awsui_no-data-container_113qp_q10sj_16",
|
|
8
|
+
"no-data": "awsui_no-data_113qp_q10sj_16",
|
|
9
|
+
"no-data-wrapper": "awsui_no-data-wrapper_113qp_q10sj_34",
|
|
10
|
+
"no-data-empty": "awsui_no-data-empty_113qp_q10sj_42",
|
|
11
|
+
"chart-zoom-controls": "awsui_chart-zoom-controls_113qp_q10sj_46",
|
|
12
|
+
"chart-filters": "awsui_chart-filters_113qp_q10sj_52",
|
|
13
|
+
"chart-filters-series": "awsui_chart-filters-series_113qp_q10sj_58",
|
|
14
|
+
"axis-vertical-title": "awsui_axis-vertical-title_113qp_q10sj_62",
|
|
15
|
+
"axis-vertical-title-item": "awsui_axis-vertical-title-item_113qp_q10sj_70",
|
|
16
|
+
"error-range": "awsui_error-range_113qp_q10sj_77",
|
|
17
|
+
"tooltip-default-header": "awsui_tooltip-default-header_113qp_q10sj_83",
|
|
18
|
+
"chart-container-root": "awsui_chart-container-root_113qp_q10sj_89",
|
|
19
|
+
"chart-container-fit-height": "awsui_chart-container-fit-height_113qp_q10sj_93",
|
|
20
|
+
"chart-container-min-width": "awsui_chart-container-min-width_113qp_q10sj_99",
|
|
21
|
+
"chart-plot-and-legend-wrapper": "awsui_chart-plot-and-legend-wrapper_113qp_q10sj_103",
|
|
22
|
+
"chart-plot-wrapper": "awsui_chart-plot-wrapper_113qp_q10sj_107",
|
|
23
|
+
"bottom-legend-container": "awsui_bottom-legend-container_113qp_q10sj_112",
|
|
24
|
+
"side-legend-container": "awsui_side-legend-container_113qp_q10sj_119",
|
|
25
|
+
"application": "awsui_application_113qp_q10sj_128"
|
|
25
26
|
};
|
|
26
27
|
|