@progress/kendo-charts 1.32.1 → 1.33.0-dev.202311081130
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/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/chart/bar-chart/bar.js +40 -16
- package/dist/es/chart/bubble-chart/bubble.js +10 -0
- package/dist/es/chart/bullet-chart/bullet.js +32 -11
- package/dist/es/chart/candlestick-chart/candlestick.js +37 -1
- package/dist/es/chart/categorical-chart.js +1 -1
- package/dist/es/chart/chart.js +307 -26
- package/dist/es/chart/constants.js +12 -1
- package/dist/es/chart/funnel-chart/funnel-chart.js +5 -3
- package/dist/es/chart/funnel-chart/funnel-segment.js +62 -3
- package/dist/es/chart/heatmap-chart/heatmap-chart.js +2 -1
- package/dist/es/chart/heatmap-chart/heatmap-point.js +68 -29
- package/dist/es/chart/legend/legend-item.js +32 -2
- package/dist/es/chart/legend/legend.js +6 -1
- package/dist/es/chart/line-chart/line-point.js +109 -26
- package/dist/es/chart/mixins/accessibility-attributes-mixin.js +36 -0
- package/dist/es/chart/pie-chart/pie-chart.js +1 -1
- package/dist/es/chart/pie-chart/pie-segment.js +50 -14
- package/dist/es/chart/plotarea/categorical-plotarea.js +53 -2
- package/dist/es/chart/plotarea/funnel-plotarea.js +8 -0
- package/dist/es/chart/plotarea/heatmap-plotarea.js +66 -1
- package/dist/es/chart/plotarea/plotarea-base.js +71 -1
- package/dist/es/chart/plotarea/radar-plotarea.js +8 -0
- package/dist/es/chart/radar-bar-chart/radar-segment.js +4 -0
- package/dist/es/chart/range-area-chart/range-area-point.js +26 -1
- package/dist/es/chart/range-bar-chart/range-bar.js +3 -24
- package/dist/es/chart/scatter-charts/scatter-chart.js +1 -1
- package/dist/es/common/constants.js +6 -0
- package/dist/es/common/cycleDown.js +5 -0
- package/dist/es/common/cycleIndex.js +13 -0
- package/dist/es/common/cycleUp.js +3 -0
- package/dist/es/common.js +3 -0
- package/dist/es/core/chart-element.js +31 -3
- package/dist/es/core/shape-builder.js +1 -1
- package/dist/es/core/shape-element.js +3 -0
- package/dist/es/core/utils/add-accessibility-attributes-to-visual.js +8 -0
- package/dist/es/core/utils/guid.js +17 -0
- package/dist/es/map/layers/shape.js +0 -2
- package/dist/es/map/navigator.js +0 -1
- package/dist/es/map/scroller/user-events.js +0 -2
- package/dist/es/map/utils.js +0 -18
- package/dist/es/map/zoom.js +0 -1
- package/dist/es2015/chart/bar-chart/bar.js +40 -16
- package/dist/es2015/chart/bubble-chart/bubble.js +10 -0
- package/dist/es2015/chart/bullet-chart/bullet.js +32 -11
- package/dist/es2015/chart/candlestick-chart/candlestick.js +37 -1
- package/dist/es2015/chart/categorical-chart.js +1 -1
- package/dist/es2015/chart/chart.js +295 -26
- package/dist/es2015/chart/constants.js +12 -1
- package/dist/es2015/chart/funnel-chart/funnel-chart.js +5 -3
- package/dist/es2015/chart/funnel-chart/funnel-segment.js +62 -3
- package/dist/es2015/chart/heatmap-chart/heatmap-chart.js +2 -1
- package/dist/es2015/chart/heatmap-chart/heatmap-point.js +68 -29
- package/dist/es2015/chart/legend/legend-item.js +32 -2
- package/dist/es2015/chart/legend/legend.js +6 -1
- package/dist/es2015/chart/line-chart/line-point.js +110 -26
- package/dist/es2015/chart/mixins/accessibility-attributes-mixin.js +36 -0
- package/dist/es2015/chart/pie-chart/pie-chart.js +1 -1
- package/dist/es2015/chart/pie-chart/pie-segment.js +50 -14
- package/dist/es2015/chart/plotarea/categorical-plotarea.js +49 -2
- package/dist/es2015/chart/plotarea/funnel-plotarea.js +8 -0
- package/dist/es2015/chart/plotarea/heatmap-plotarea.js +60 -1
- package/dist/es2015/chart/plotarea/plotarea-base.js +67 -1
- package/dist/es2015/chart/plotarea/radar-plotarea.js +8 -0
- package/dist/es2015/chart/radar-bar-chart/radar-segment.js +4 -0
- package/dist/es2015/chart/range-area-chart/range-area-point.js +26 -1
- package/dist/es2015/chart/range-bar-chart/range-bar.js +3 -24
- package/dist/es2015/chart/scatter-charts/scatter-chart.js +1 -1
- package/dist/es2015/common/constants.js +6 -0
- package/dist/es2015/common/cycleDown.js +5 -0
- package/dist/es2015/common/cycleIndex.js +13 -0
- package/dist/es2015/common/cycleUp.js +3 -0
- package/dist/es2015/common.js +3 -0
- package/dist/es2015/core/chart-element.js +31 -3
- package/dist/es2015/core/shape-builder.js +1 -1
- package/dist/es2015/core/shape-element.js +3 -0
- package/dist/es2015/core/utils/add-accessibility-attributes-to-visual.js +8 -0
- package/dist/es2015/core/utils/guid.js +17 -0
- package/dist/es2015/map/layers/shape.js +0 -2
- package/dist/es2015/map/navigator.js +0 -2
- package/dist/es2015/map/scroller/user-events.js +0 -2
- package/dist/es2015/map/utils.js +0 -18
- package/dist/es2015/map/zoom.js +0 -2
- package/dist/npm/main.js +1098 -156
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
- package/dist/es/chart/area-chart/area-segment-mixin.js +0 -91
- package/dist/es2015/chart/area-chart/area-segment-mixin.js +0 -91
|
@@ -2,7 +2,7 @@ import { drawing as draw, Color } from '@progress/kendo-drawing';
|
|
|
2
2
|
|
|
3
3
|
import BarLabel from './bar-label';
|
|
4
4
|
|
|
5
|
-
import { BORDER_BRIGHTNESS, TOOLTIP_OFFSET } from '../constants';
|
|
5
|
+
import { CHART_POINT_ROLE_DESCRIPTION, CHART_POINT_CLASSNAME, CHART_POINT_ROLE, BORDER_BRIGHTNESS, TOOLTIP_OFFSET } from '../constants';
|
|
6
6
|
|
|
7
7
|
import hasGradientOverlay from '../utils/has-gradient-overlay';
|
|
8
8
|
|
|
@@ -10,6 +10,7 @@ import { ChartElement, Point } from '../../core';
|
|
|
10
10
|
|
|
11
11
|
import PointEventsMixin from '../mixins/point-events-mixin';
|
|
12
12
|
import NoteMixin from '../mixins/note-mixin';
|
|
13
|
+
import AccessibilityAttributesMixin from '../mixins/accessibility-attributes-mixin';
|
|
13
14
|
|
|
14
15
|
import { WHITE, LEFT, RIGHT, BOTTOM, TOP } from '../../common/constants';
|
|
15
16
|
import { alignPathToPixel, deepExtend, defined, getTemplate, valueOrDefault } from '../../common';
|
|
@@ -50,24 +51,28 @@ var Bar = (function (ChartElement) {
|
|
|
50
51
|
var labels = options.labels;
|
|
51
52
|
|
|
52
53
|
if (labels.visible) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
this.label = this.createLabelElement(labels);
|
|
55
|
+
this.append(this.label);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
59
|
+
Bar.prototype.createLabelElement = function createLabelElement (options) {
|
|
60
|
+
return new BarLabel(this.getLabelText(options),
|
|
61
|
+
deepExtend({
|
|
62
|
+
vertical: this.options.vertical
|
|
63
|
+
},
|
|
64
|
+
options
|
|
65
|
+
), this.pointData());
|
|
66
|
+
};
|
|
62
67
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
), pointData);
|
|
69
|
-
this.append(this.label);
|
|
68
|
+
Bar.prototype.getLabelText = function getLabelText (options) {
|
|
69
|
+
var labelTemplate = getTemplate(options);
|
|
70
|
+
|
|
71
|
+
if (labelTemplate) {
|
|
72
|
+
return labelTemplate(this.pointData());
|
|
70
73
|
}
|
|
74
|
+
|
|
75
|
+
return this.formatValue(options.format);
|
|
71
76
|
};
|
|
72
77
|
|
|
73
78
|
Bar.prototype.formatValue = function formatValue (format) {
|
|
@@ -110,6 +115,8 @@ var Bar = (function (ChartElement) {
|
|
|
110
115
|
if (this.visible !== false) {
|
|
111
116
|
ChartElement.prototype.createVisual.call(this);
|
|
112
117
|
|
|
118
|
+
this.addAccessibilityAttributesToVisual();
|
|
119
|
+
|
|
113
120
|
if (customVisual) {
|
|
114
121
|
var visual = this.rectVisual = customVisual({
|
|
115
122
|
category: this.category,
|
|
@@ -203,6 +210,13 @@ var Bar = (function (ChartElement) {
|
|
|
203
210
|
};
|
|
204
211
|
};
|
|
205
212
|
|
|
213
|
+
Bar.prototype.createFocusHighlight = function createFocusHighlight (style) {
|
|
214
|
+
var borderWidth = this.options.accessibility.highlight.border.width;
|
|
215
|
+
var highlight = draw.Path.fromRect(this.box.pad(borderWidth / 2).toRect(), style);
|
|
216
|
+
|
|
217
|
+
return alignPathToPixel(highlight);
|
|
218
|
+
};
|
|
219
|
+
|
|
206
220
|
Bar.prototype.getBorderColor = function getBorderColor () {
|
|
207
221
|
var color = this.color;
|
|
208
222
|
var border = this.options.border;
|
|
@@ -284,11 +298,16 @@ var Bar = (function (ChartElement) {
|
|
|
284
298
|
};
|
|
285
299
|
};
|
|
286
300
|
|
|
301
|
+
Bar.prototype.getIndex = function getIndex () {
|
|
302
|
+
return this.categoryIx;
|
|
303
|
+
};
|
|
304
|
+
|
|
287
305
|
return Bar;
|
|
288
306
|
}(ChartElement));
|
|
289
307
|
|
|
290
308
|
deepExtend(Bar.prototype, PointEventsMixin);
|
|
291
309
|
deepExtend(Bar.prototype, NoteMixin);
|
|
310
|
+
deepExtend(Bar.prototype, AccessibilityAttributesMixin);
|
|
292
311
|
|
|
293
312
|
Bar.prototype.defaults = {
|
|
294
313
|
border: {
|
|
@@ -305,6 +324,11 @@ Bar.prototype.defaults = {
|
|
|
305
324
|
opacity: 1,
|
|
306
325
|
notes: {
|
|
307
326
|
label: {}
|
|
327
|
+
},
|
|
328
|
+
accessibility: {
|
|
329
|
+
role: CHART_POINT_ROLE,
|
|
330
|
+
className: CHART_POINT_CLASSNAME,
|
|
331
|
+
ariaRoleDescription: CHART_POINT_ROLE_DESCRIPTION
|
|
308
332
|
}
|
|
309
333
|
};
|
|
310
334
|
|
|
@@ -60,6 +60,16 @@ var Bubble = (function (LinePoint) {
|
|
|
60
60
|
return highlightGroup;
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
+
Bubble.prototype.createFocusHighlight = function createFocusHighlight (style) {
|
|
64
|
+
var highlightOptions = this.options.accessibility.highlight;
|
|
65
|
+
var markers = this.options.markers;
|
|
66
|
+
var center = this.box.center();
|
|
67
|
+
var radius = (markers.size + markers.border.width) / 2 + highlightOptions.border.width / 2;
|
|
68
|
+
var highlight = new draw.Circle(new geom.Circle([ center.x, center.y ], radius), style);
|
|
69
|
+
|
|
70
|
+
return highlight;
|
|
71
|
+
};
|
|
72
|
+
|
|
63
73
|
return Bubble;
|
|
64
74
|
}(LinePoint));
|
|
65
75
|
|
|
@@ -12,6 +12,8 @@ import { WHITE, TOP, RIGHT } from '../../common/constants';
|
|
|
12
12
|
import { alignPathToPixel, deepExtend, defined, getTemplate, setDefaultOptions, valueOrDefault } from '../../common';
|
|
13
13
|
|
|
14
14
|
import BarLabel from '../bar-chart/bar-label';
|
|
15
|
+
import { CHART_POINT_ROLE_DESCRIPTION, CHART_POINT_CLASSNAME, CHART_POINT_ROLE } from '../constants';
|
|
16
|
+
import AccessibilityAttributesMixin from '../mixins/accessibility-attributes-mixin';
|
|
15
17
|
|
|
16
18
|
var Bullet = (function (ChartElement) {
|
|
17
19
|
function Bullet(value, options) {
|
|
@@ -60,21 +62,27 @@ var Bullet = (function (ChartElement) {
|
|
|
60
62
|
var labels = options.labels;
|
|
61
63
|
|
|
62
64
|
if (labels.visible) {
|
|
63
|
-
|
|
64
|
-
var labelTemplate = getTemplate(labels);
|
|
65
|
-
var labelText;
|
|
66
|
-
|
|
67
|
-
if (labelTemplate) {
|
|
68
|
-
labelText = labelTemplate(pointData);
|
|
69
|
-
} else {
|
|
70
|
-
labelText = this.formatValue(labels.format);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
this.label = new BarLabel(labelText, labels, pointData);
|
|
65
|
+
this.label = this.createLabelElement(labels);
|
|
74
66
|
this.append(this.label);
|
|
75
67
|
}
|
|
76
68
|
};
|
|
77
69
|
|
|
70
|
+
Bullet.prototype.createLabelElement = function createLabelElement (options) {
|
|
71
|
+
return new BarLabel(this.getLabelText(options),
|
|
72
|
+
options,
|
|
73
|
+
this.pointData());
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
Bullet.prototype.getLabelText = function getLabelText (options) {
|
|
77
|
+
var labelTemplate = getTemplate(options);
|
|
78
|
+
|
|
79
|
+
if (labelTemplate) {
|
|
80
|
+
return labelTemplate(this.pointData());
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return this.formatValue(options.format);
|
|
84
|
+
};
|
|
85
|
+
|
|
78
86
|
Bullet.prototype.reflow = function reflow (box) {
|
|
79
87
|
this.render();
|
|
80
88
|
|
|
@@ -115,6 +123,8 @@ var Bullet = (function (ChartElement) {
|
|
|
115
123
|
Bullet.prototype.createVisual = function createVisual () {
|
|
116
124
|
ChartElement.prototype.createVisual.call(this);
|
|
117
125
|
|
|
126
|
+
this.addAccessibilityAttributesToVisual();
|
|
127
|
+
|
|
118
128
|
var options = this.options;
|
|
119
129
|
var body = draw.Path.fromRect(this.box.toRect(), {
|
|
120
130
|
fill: {
|
|
@@ -180,10 +190,15 @@ var Bullet = (function (ChartElement) {
|
|
|
180
190
|
return this.box.overlaps(box);
|
|
181
191
|
};
|
|
182
192
|
|
|
193
|
+
Bullet.prototype.getIndex = function getIndex () {
|
|
194
|
+
return this.categoryIx;
|
|
195
|
+
};
|
|
196
|
+
|
|
183
197
|
return Bullet;
|
|
184
198
|
}(ChartElement));
|
|
185
199
|
|
|
186
200
|
Bullet.prototype.tooltipAnchor = Bar.prototype.tooltipAnchor;
|
|
201
|
+
Bullet.prototype.createFocusHighlight = Bar.prototype.createFocusHighlight;
|
|
187
202
|
|
|
188
203
|
setDefaultOptions(Bullet, {
|
|
189
204
|
border: {
|
|
@@ -209,10 +224,16 @@ setDefaultOptions(Bullet, {
|
|
|
209
224
|
},
|
|
210
225
|
notes: {
|
|
211
226
|
label: {}
|
|
227
|
+
},
|
|
228
|
+
accessibility: {
|
|
229
|
+
role: CHART_POINT_ROLE,
|
|
230
|
+
className: CHART_POINT_CLASSNAME,
|
|
231
|
+
ariaRoleDescription: CHART_POINT_ROLE_DESCRIPTION
|
|
212
232
|
}
|
|
213
233
|
});
|
|
214
234
|
|
|
215
235
|
deepExtend(Bullet.prototype, PointEventsMixin);
|
|
216
236
|
deepExtend(Bullet.prototype, NoteMixin);
|
|
237
|
+
deepExtend(Bullet.prototype, AccessibilityAttributesMixin);
|
|
217
238
|
|
|
218
239
|
export default Bullet;
|
|
@@ -3,8 +3,10 @@ import { drawing as draw, Color } from '@progress/kendo-drawing';
|
|
|
3
3
|
import { ChartElement, Point } from '../../core';
|
|
4
4
|
import PointEventsMixin from '../mixins/point-events-mixin';
|
|
5
5
|
import NoteMixin from '../mixins/note-mixin';
|
|
6
|
+
import Bar from '../bar-chart/bar';
|
|
7
|
+
import AccessibilityAttributesMixin from '../mixins/accessibility-attributes-mixin';
|
|
6
8
|
|
|
7
|
-
import { TOOLTIP_OFFSET } from '../constants';
|
|
9
|
+
import { CHART_POINT_ROLE_DESCRIPTION, CHART_POINT_CLASSNAME, CHART_POINT_ROLE, TOOLTIP_OFFSET } from '../constants';
|
|
8
10
|
import hasGradientOverlay from '../utils/has-gradient-overlay';
|
|
9
11
|
|
|
10
12
|
import { WHITE, LEFT, TOP } from '../../common/constants';
|
|
@@ -20,6 +22,10 @@ var Candlestick = (function (ChartElement) {
|
|
|
20
22
|
Candlestick.prototype = Object.create( ChartElement && ChartElement.prototype );
|
|
21
23
|
Candlestick.prototype.constructor = Candlestick;
|
|
22
24
|
|
|
25
|
+
Candlestick.prototype.getLabelText = function getLabelText (options) {
|
|
26
|
+
return this.formatValue(options.format);
|
|
27
|
+
};
|
|
28
|
+
|
|
23
29
|
Candlestick.prototype.reflow = function reflow (box) {
|
|
24
30
|
var ref = this;
|
|
25
31
|
var options = ref.options;
|
|
@@ -60,6 +66,9 @@ var Candlestick = (function (ChartElement) {
|
|
|
60
66
|
|
|
61
67
|
Candlestick.prototype.createVisual = function createVisual () {
|
|
62
68
|
ChartElement.prototype.createVisual.call(this);
|
|
69
|
+
|
|
70
|
+
this.addAccessibilityAttributesToVisual();
|
|
71
|
+
|
|
63
72
|
this._mainVisual = this.mainVisual(this.options);
|
|
64
73
|
this.visual.append(
|
|
65
74
|
this._mainVisual
|
|
@@ -204,9 +213,27 @@ var Candlestick = (function (ChartElement) {
|
|
|
204
213
|
return this.box.overlaps(box);
|
|
205
214
|
};
|
|
206
215
|
|
|
216
|
+
Candlestick.prototype.pointData = function pointData () {
|
|
217
|
+
return {
|
|
218
|
+
dataItem: this.dataItem,
|
|
219
|
+
value: this.value,
|
|
220
|
+
meanPoints: this.meanPoints,
|
|
221
|
+
medianPoints: this.medianPoints,
|
|
222
|
+
whiskerPoints: this.whiskerPoints,
|
|
223
|
+
stackValue: this.stackValue,
|
|
224
|
+
series: this.series
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
Candlestick.prototype.getIndex = function getIndex () {
|
|
229
|
+
return this.categoryIx;
|
|
230
|
+
};
|
|
231
|
+
|
|
207
232
|
return Candlestick;
|
|
208
233
|
}(ChartElement));
|
|
209
234
|
|
|
235
|
+
Candlestick.prototype.createFocusHighlight = Bar.prototype.createFocusHighlight;
|
|
236
|
+
|
|
210
237
|
setDefaultOptions(Candlestick, {
|
|
211
238
|
vertical: true,
|
|
212
239
|
border: {
|
|
@@ -227,6 +254,9 @@ setDefaultOptions(Candlestick, {
|
|
|
227
254
|
"<tr><td>Close:</td><td>{3:C}</td></tr>" +
|
|
228
255
|
"</table>"
|
|
229
256
|
},
|
|
257
|
+
labels: {
|
|
258
|
+
format: ""
|
|
259
|
+
},
|
|
230
260
|
highlight: {
|
|
231
261
|
opacity: 1,
|
|
232
262
|
border: {
|
|
@@ -241,10 +271,16 @@ setDefaultOptions(Candlestick, {
|
|
|
241
271
|
notes: {
|
|
242
272
|
visible: true,
|
|
243
273
|
label: {}
|
|
274
|
+
},
|
|
275
|
+
accessibility: {
|
|
276
|
+
role: CHART_POINT_ROLE,
|
|
277
|
+
className: CHART_POINT_CLASSNAME,
|
|
278
|
+
ariaRoleDescription: CHART_POINT_ROLE_DESCRIPTION
|
|
244
279
|
}
|
|
245
280
|
});
|
|
246
281
|
|
|
247
282
|
deepExtend(Candlestick.prototype, PointEventsMixin);
|
|
248
283
|
deepExtend(Candlestick.prototype, NoteMixin);
|
|
284
|
+
deepExtend(Candlestick.prototype, AccessibilityAttributesMixin);
|
|
249
285
|
|
|
250
286
|
export default Candlestick;
|
|
@@ -326,7 +326,7 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
326
326
|
excluded: [
|
|
327
327
|
"data", "aggregate", "_events", "tooltip", "content", "template",
|
|
328
328
|
"visual", "toggle", "_outOfRangeMinPoint", "_outOfRangeMaxPoint",
|
|
329
|
-
"drilldownSeriesFactory"
|
|
329
|
+
"drilldownSeriesFactory", "ariaTemplate"
|
|
330
330
|
]
|
|
331
331
|
};
|
|
332
332
|
|