@progress/kendo-charts 2.7.3-develop.1 → 2.8.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/chart/bubble-chart/bubble.js +2 -1
- package/dist/es/chart/candlestick-chart/candlestick.js +5 -5
- package/dist/es/chart/chart.js +7 -4
- package/dist/es/chart/mixins/clip-animation-mixin.js +6 -5
- package/dist/es/chart/pie-chart/pie-segment.js +2 -1
- package/dist/es/sankey/legend.js +11 -8
- package/dist/es2015/chart/bubble-chart/bubble.js +2 -1
- package/dist/es2015/chart/candlestick-chart/candlestick.js +5 -5
- package/dist/es2015/chart/chart.js +7 -4
- package/dist/es2015/chart/mixins/clip-animation-mixin.js +6 -5
- package/dist/es2015/chart/pie-chart/pie-segment.js +2 -1
- package/dist/es2015/sankey/legend.js +11 -8
- package/dist/npm/main.js +34 -25
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
|
@@ -44,7 +44,8 @@ class Bubble extends LinePoint {
|
|
|
44
44
|
color: border.color ||
|
|
45
45
|
new Color(markers.background).brightness(BORDER_BRIGHTNESS).toHex(),
|
|
46
46
|
width: border.width,
|
|
47
|
-
opacity: border.opacity
|
|
47
|
+
opacity: border.opacity,
|
|
48
|
+
dashType: border.dashType
|
|
48
49
|
},
|
|
49
50
|
fill: createPatternFill(this.options.pattern, {
|
|
50
51
|
color: markers.background,
|
|
@@ -91,7 +91,7 @@ class Candlestick extends ChartElement {
|
|
|
91
91
|
|
|
92
92
|
if (options.border.width > 0) {
|
|
93
93
|
body.options.set("stroke", {
|
|
94
|
-
color: this.getBorderColor(),
|
|
94
|
+
color: this.getBorderColor(options),
|
|
95
95
|
width: options.border.width,
|
|
96
96
|
dashType: options.border.dashType,
|
|
97
97
|
opacity: valueOrDefault(options.border.opacity, options.opacity)
|
|
@@ -134,12 +134,12 @@ class Candlestick extends ChartElement {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
getBorderColor() {
|
|
138
|
-
const border =
|
|
137
|
+
getBorderColor(options) {
|
|
138
|
+
const border = options.border;
|
|
139
139
|
let borderColor = border.color;
|
|
140
140
|
|
|
141
141
|
if (!defined(borderColor)) {
|
|
142
|
-
borderColor = new Color(this.color).brightness(border._brightness).toHex();
|
|
142
|
+
borderColor = new Color(this.color).brightness(this.options.border._brightness).toHex();
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
return borderColor;
|
|
@@ -165,7 +165,7 @@ class Candlestick extends ChartElement {
|
|
|
165
165
|
const overlay = this.mainVisual(
|
|
166
166
|
deepExtend({}, this.options, {
|
|
167
167
|
line: {
|
|
168
|
-
color: this.getBorderColor()
|
|
168
|
+
color: this.getBorderColor(highlight)
|
|
169
169
|
}
|
|
170
170
|
}, highlight)
|
|
171
171
|
);
|
package/dist/es/chart/chart.js
CHANGED
|
@@ -346,9 +346,12 @@ class Chart extends Class {
|
|
|
346
346
|
|
|
347
347
|
model.renderVisual();
|
|
348
348
|
|
|
349
|
-
|
|
349
|
+
const transitions = this.options.transitions;
|
|
350
|
+
if (transitions !== false) {
|
|
350
351
|
model.traverse(function(element) {
|
|
351
352
|
if (element.animation) {
|
|
353
|
+
const loading = (transitions && transitions !== true) ? transitions.loading : transitions;
|
|
354
|
+
element.animation.options = Object.assign({}, element.animation.options, loading);
|
|
352
355
|
element.animation.setup();
|
|
353
356
|
}
|
|
354
357
|
});
|
|
@@ -357,7 +360,7 @@ class Chart extends Class {
|
|
|
357
360
|
this._initSurface();
|
|
358
361
|
this.surface.draw(model.visual);
|
|
359
362
|
|
|
360
|
-
if (
|
|
363
|
+
if (transitions !== false) {
|
|
361
364
|
model.traverse(function(element) {
|
|
362
365
|
if (element.animation) {
|
|
363
366
|
element.animation.play();
|
|
@@ -1926,14 +1929,14 @@ class Chart extends Class {
|
|
|
1926
1929
|
let transitionsState;
|
|
1927
1930
|
|
|
1928
1931
|
if (options.transitions !== false) {
|
|
1932
|
+
transitionsState = options.transitions;
|
|
1929
1933
|
options.transitions = false;
|
|
1930
|
-
transitionsState = true;
|
|
1931
1934
|
}
|
|
1932
1935
|
|
|
1933
1936
|
this._redraw();
|
|
1934
1937
|
|
|
1935
1938
|
if (transitionsState) {
|
|
1936
|
-
options.transitions =
|
|
1939
|
+
options.transitions = transitionsState;
|
|
1937
1940
|
}
|
|
1938
1941
|
}
|
|
1939
1942
|
|
|
@@ -7,13 +7,14 @@ import { defined } from '../../common';
|
|
|
7
7
|
const ClipAnimationMixin = {
|
|
8
8
|
createAnimation: function() {
|
|
9
9
|
const root = this.getRoot();
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
const transitions = ((root && root.options) || {}).transitions;
|
|
11
|
+
if (root && transitions !== false) {
|
|
12
|
+
const box = (this.parent && this.parent.clipBox) || root.size();
|
|
12
13
|
const clipPath = draw.Path.fromRect(box.toRect());
|
|
14
|
+
const loading = (transitions && transitions !== true) ? transitions.loading : transitions;
|
|
13
15
|
this.visual.clip(clipPath);
|
|
14
|
-
this.animation = new ClipAnimation(clipPath, {
|
|
15
|
-
|
|
16
|
-
});
|
|
16
|
+
this.animation = new ClipAnimation(clipPath, Object.assign({}, {box: box},
|
|
17
|
+
loading));
|
|
17
18
|
if (anyHasZIndex(this.options.series)) {
|
|
18
19
|
this._setChildrenAnimation(clipPath);
|
|
19
20
|
}
|
package/dist/es/sankey/legend.js
CHANGED
|
@@ -36,14 +36,17 @@ export class Legend extends SankeyElement {
|
|
|
36
36
|
labelsTemplate = getTemplate(labels);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
const data = nodes.map((node) =>
|
|
40
|
-
text
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
const data = nodes.map((node) => {
|
|
40
|
+
const text = (node.label && node.label.text) || '';
|
|
41
|
+
return ({
|
|
42
|
+
text: labelsTemplate ? labelsTemplate({ text, node }) : text,
|
|
43
|
+
area: {
|
|
44
|
+
background: item.areaBackground !== undefined ? item.areaBackground : node.color,
|
|
45
|
+
opacity: item.areaOpacity !== undefined ? item.areaOpacity : node.opacity
|
|
46
|
+
},
|
|
47
|
+
node: node
|
|
48
|
+
});
|
|
49
|
+
});
|
|
47
50
|
|
|
48
51
|
data.sort(sort(rtl));
|
|
49
52
|
|
|
@@ -44,7 +44,8 @@ class Bubble extends LinePoint {
|
|
|
44
44
|
color: border.color ||
|
|
45
45
|
new Color(markers.background).brightness(BORDER_BRIGHTNESS).toHex(),
|
|
46
46
|
width: border.width,
|
|
47
|
-
opacity: border.opacity
|
|
47
|
+
opacity: border.opacity,
|
|
48
|
+
dashType: border.dashType
|
|
48
49
|
},
|
|
49
50
|
fill: createPatternFill(this.options.pattern, {
|
|
50
51
|
color: markers.background,
|
|
@@ -91,7 +91,7 @@ class Candlestick extends ChartElement {
|
|
|
91
91
|
|
|
92
92
|
if (options.border.width > 0) {
|
|
93
93
|
body.options.set("stroke", {
|
|
94
|
-
color: this.getBorderColor(),
|
|
94
|
+
color: this.getBorderColor(options),
|
|
95
95
|
width: options.border.width,
|
|
96
96
|
dashType: options.border.dashType,
|
|
97
97
|
opacity: valueOrDefault(options.border.opacity, options.opacity)
|
|
@@ -134,12 +134,12 @@ class Candlestick extends ChartElement {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
getBorderColor() {
|
|
138
|
-
const border =
|
|
137
|
+
getBorderColor(options) {
|
|
138
|
+
const border = options.border;
|
|
139
139
|
let borderColor = border.color;
|
|
140
140
|
|
|
141
141
|
if (!defined(borderColor)) {
|
|
142
|
-
borderColor = new Color(this.color).brightness(border._brightness).toHex();
|
|
142
|
+
borderColor = new Color(this.color).brightness(this.options.border._brightness).toHex();
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
return borderColor;
|
|
@@ -165,7 +165,7 @@ class Candlestick extends ChartElement {
|
|
|
165
165
|
const overlay = this.mainVisual(
|
|
166
166
|
deepExtend({}, this.options, {
|
|
167
167
|
line: {
|
|
168
|
-
color: this.getBorderColor()
|
|
168
|
+
color: this.getBorderColor(highlight)
|
|
169
169
|
}
|
|
170
170
|
}, highlight)
|
|
171
171
|
);
|
|
@@ -346,9 +346,12 @@ class Chart extends Class {
|
|
|
346
346
|
|
|
347
347
|
model.renderVisual();
|
|
348
348
|
|
|
349
|
-
|
|
349
|
+
const transitions = this.options.transitions;
|
|
350
|
+
if (transitions !== false) {
|
|
350
351
|
model.traverse(function(element) {
|
|
351
352
|
if (element.animation) {
|
|
353
|
+
const loading = (transitions && transitions !== true) ? transitions.loading : transitions;
|
|
354
|
+
element.animation.options = Object.assign({}, element.animation.options, loading);
|
|
352
355
|
element.animation.setup();
|
|
353
356
|
}
|
|
354
357
|
});
|
|
@@ -357,7 +360,7 @@ class Chart extends Class {
|
|
|
357
360
|
this._initSurface();
|
|
358
361
|
this.surface.draw(model.visual);
|
|
359
362
|
|
|
360
|
-
if (
|
|
363
|
+
if (transitions !== false) {
|
|
361
364
|
model.traverse(function(element) {
|
|
362
365
|
if (element.animation) {
|
|
363
366
|
element.animation.play();
|
|
@@ -1926,14 +1929,14 @@ class Chart extends Class {
|
|
|
1926
1929
|
let transitionsState;
|
|
1927
1930
|
|
|
1928
1931
|
if (options.transitions !== false) {
|
|
1932
|
+
transitionsState = options.transitions;
|
|
1929
1933
|
options.transitions = false;
|
|
1930
|
-
transitionsState = true;
|
|
1931
1934
|
}
|
|
1932
1935
|
|
|
1933
1936
|
this._redraw();
|
|
1934
1937
|
|
|
1935
1938
|
if (transitionsState) {
|
|
1936
|
-
options.transitions =
|
|
1939
|
+
options.transitions = transitionsState;
|
|
1937
1940
|
}
|
|
1938
1941
|
}
|
|
1939
1942
|
|
|
@@ -7,13 +7,14 @@ import { defined } from '../../common';
|
|
|
7
7
|
const ClipAnimationMixin = {
|
|
8
8
|
createAnimation: function() {
|
|
9
9
|
const root = this.getRoot();
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
const transitions = ((root && root.options) || {}).transitions;
|
|
11
|
+
if (root && transitions !== false) {
|
|
12
|
+
const box = (this.parent && this.parent.clipBox) || root.size();
|
|
12
13
|
const clipPath = draw.Path.fromRect(box.toRect());
|
|
14
|
+
const loading = (transitions && transitions !== true) ? transitions.loading : transitions;
|
|
13
15
|
this.visual.clip(clipPath);
|
|
14
|
-
this.animation = new ClipAnimation(clipPath, {
|
|
15
|
-
|
|
16
|
-
});
|
|
16
|
+
this.animation = new ClipAnimation(clipPath, Object.assign({}, {box: box},
|
|
17
|
+
loading));
|
|
17
18
|
if (anyHasZIndex(this.options.series)) {
|
|
18
19
|
this._setChildrenAnimation(clipPath);
|
|
19
20
|
}
|
|
@@ -36,14 +36,17 @@ export class Legend extends SankeyElement {
|
|
|
36
36
|
labelsTemplate = getTemplate(labels);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
const data = nodes.map((node) =>
|
|
40
|
-
text
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
const data = nodes.map((node) => {
|
|
40
|
+
const text = (node.label && node.label.text) || '';
|
|
41
|
+
return ({
|
|
42
|
+
text: labelsTemplate ? labelsTemplate({ text, node }) : text,
|
|
43
|
+
area: {
|
|
44
|
+
background: item.areaBackground !== undefined ? item.areaBackground : node.color,
|
|
45
|
+
opacity: item.areaOpacity !== undefined ? item.areaOpacity : node.opacity
|
|
46
|
+
},
|
|
47
|
+
node: node
|
|
48
|
+
});
|
|
49
|
+
});
|
|
47
50
|
|
|
48
51
|
data.sort(sort(rtl));
|
|
49
52
|
|