@progress/kendo-charts 2.3.0-dev.202404011240 → 2.3.0-dev.202404030834

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.
@@ -26,6 +26,7 @@ export var Legend = (function (SankeyElement) {
26
26
  var drawingRect = options.drawingRect;
27
27
  var nodes = options.nodes; if ( nodes === void 0 ) nodes = [];
28
28
  var colors = options.colors; if ( colors === void 0 ) colors = [];
29
+ var item = options.item;
29
30
 
30
31
  if (options.visible === false || !nodes.length) {
31
32
  return null;
@@ -33,7 +34,10 @@ export var Legend = (function (SankeyElement) {
33
34
 
34
35
  var data = nodes.map(function (node, index) { return ({
35
36
  text: (node.label && node.label.text) || '',
36
- area: { background: nodeColor(node, colors, index), opacity: node.opacity },
37
+ area: {
38
+ background: item.areaBackground !== undefined ? item.areaBackground : nodeColor(node, colors, index),
39
+ opacity: item.areaOpacity !== undefined ? item.areaOpacity : node.opacity
40
+ },
37
41
  node: node,
38
42
  }); });
39
43
 
@@ -53,6 +53,10 @@ export var Sankey = (function (Observable) {
53
53
  if (title.text) {
54
54
  element.setAttribute('aria-label', title.text);
55
55
  }
56
+
57
+ if (title.description) {
58
+ element.setAttribute("aria-roledescription", title.description);
59
+ }
56
60
  };
57
61
 
58
62
  Sankey.prototype._initSurface = function _initSurface () {
@@ -15,7 +15,7 @@ const sortData = (a, b) => {
15
15
  export class Legend extends SankeyElement {
16
16
  getElement() {
17
17
  const options = this.options;
18
- const { drawingRect, nodes = [], colors = [] } = options;
18
+ const { drawingRect, nodes = [], colors = [], item } = options;
19
19
 
20
20
  if (options.visible === false || !nodes.length) {
21
21
  return null;
@@ -23,7 +23,10 @@ export class Legend extends SankeyElement {
23
23
 
24
24
  const data = nodes.map((node, index) => ({
25
25
  text: (node.label && node.label.text) || '',
26
- area: { background: nodeColor(node, colors, index), opacity: node.opacity },
26
+ area: {
27
+ background: item.areaBackground !== undefined ? item.areaBackground : nodeColor(node, colors, index),
28
+ opacity: item.areaOpacity !== undefined ? item.areaOpacity : node.opacity
29
+ },
27
30
  node: node,
28
31
  }));
29
32
 
@@ -48,6 +48,10 @@ export class Sankey extends Observable {
48
48
  if (title.text) {
49
49
  element.setAttribute('aria-label', title.text);
50
50
  }
51
+
52
+ if (title.description) {
53
+ element.setAttribute("aria-roledescription", title.description);
54
+ }
51
55
  }
52
56
 
53
57
  _initSurface() {