@progress/kendo-charts 2.8.1-develop.2 → 2.8.1-develop.4
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/chart.js +12 -2
- package/dist/es/chart/highlight.js +7 -3
- package/dist/es/core/date-category-axis.js +4 -0
- package/dist/es2015/chart/chart.js +12 -2
- package/dist/es2015/chart/highlight.js +7 -3
- package/dist/es2015/core/date-category-axis.js +4 -0
- package/dist/npm/main.js +24 -6
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
package/dist/es/chart/chart.js
CHANGED
|
@@ -1530,7 +1530,7 @@ class Chart {
|
|
|
1530
1530
|
inactivePoints = this._getInactivePoints(activePoint, chartInstance);
|
|
1531
1531
|
|
|
1532
1532
|
if (inactivePoints && inactivePoints.length) {
|
|
1533
|
-
this._highlight.show(inactivePoints,
|
|
1533
|
+
this._highlight.show(inactivePoints, this._getInactiveOpacityForSeries(activePoint.series));
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
1536
|
}
|
|
@@ -1693,7 +1693,17 @@ class Chart {
|
|
|
1693
1693
|
_getInactiveOpacityForSeries(series) {
|
|
1694
1694
|
let defaultInactiveOpacity = this.options.seriesDefaults.highlight.inactiveOpacity;
|
|
1695
1695
|
let seriesInactiveOpacity = series.highlight.inactiveOpacity;
|
|
1696
|
-
|
|
1696
|
+
|
|
1697
|
+
if (seriesInactiveOpacity !== undefined) {
|
|
1698
|
+
return seriesInactiveOpacity;
|
|
1699
|
+
}
|
|
1700
|
+
if (defaultInactiveOpacity !== undefined) {
|
|
1701
|
+
return defaultInactiveOpacity;
|
|
1702
|
+
}
|
|
1703
|
+
if (series.opacity !== undefined) {
|
|
1704
|
+
return series.opacity;
|
|
1705
|
+
}
|
|
1706
|
+
return DEFAULT_SERIES_OPACITY;
|
|
1697
1707
|
}
|
|
1698
1708
|
|
|
1699
1709
|
_getDefaultOpacityForSeries(series) {
|
|
@@ -22,6 +22,8 @@ class Highlight {
|
|
|
22
22
|
|
|
23
23
|
togglePointHighlight(point, show, opacity) {
|
|
24
24
|
const toggleHandler = (point.options.highlight || {}).toggle;
|
|
25
|
+
const highlight = point.options.highlight || {};
|
|
26
|
+
const pointInactiveOpacity = opacity !== undefined ? opacity : highlight.inactiveOpacity;
|
|
25
27
|
if (toggleHandler) {
|
|
26
28
|
const eventArgs = {
|
|
27
29
|
category: point.category,
|
|
@@ -35,17 +37,19 @@ class Highlight {
|
|
|
35
37
|
};
|
|
36
38
|
toggleHandler(eventArgs);
|
|
37
39
|
if (!eventArgs._defaultPrevented) {
|
|
38
|
-
point.toggleHighlight(show,
|
|
40
|
+
point.toggleHighlight(show, pointInactiveOpacity);
|
|
39
41
|
}
|
|
40
42
|
} else {
|
|
41
|
-
point.toggleHighlight(show,
|
|
43
|
+
point.toggleHighlight(show, pointInactiveOpacity);
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
hide() {
|
|
46
48
|
const points = this._points;
|
|
47
49
|
while (points.length) {
|
|
48
|
-
|
|
50
|
+
const point = points.pop();
|
|
51
|
+
const highlight = point.options.highlight || {};
|
|
52
|
+
this.togglePointHighlight(point, false, highlight.inactiveOpacity);
|
|
49
53
|
}
|
|
50
54
|
}
|
|
51
55
|
|
|
@@ -610,6 +610,10 @@ class DateCategoryAxis extends CategoryAxis {
|
|
|
610
610
|
|
|
611
611
|
if (range) {
|
|
612
612
|
if (range.min < totalLimits.min) {
|
|
613
|
+
if (scale < 0 && this.options.justified) {
|
|
614
|
+
const diff = dateDiff(totalLimits.min, range.min);
|
|
615
|
+
range.max = addTicks(range.max, diff);
|
|
616
|
+
}
|
|
613
617
|
range.min = totalLimits.min;
|
|
614
618
|
}
|
|
615
619
|
if (range.max > totalLimits.max) {
|
|
@@ -1530,7 +1530,7 @@ class Chart {
|
|
|
1530
1530
|
inactivePoints = this._getInactivePoints(activePoint, chartInstance);
|
|
1531
1531
|
|
|
1532
1532
|
if (inactivePoints && inactivePoints.length) {
|
|
1533
|
-
this._highlight.show(inactivePoints,
|
|
1533
|
+
this._highlight.show(inactivePoints, this._getInactiveOpacityForSeries(activePoint.series));
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
1536
|
}
|
|
@@ -1693,7 +1693,17 @@ class Chart {
|
|
|
1693
1693
|
_getInactiveOpacityForSeries(series) {
|
|
1694
1694
|
let defaultInactiveOpacity = this.options.seriesDefaults.highlight.inactiveOpacity;
|
|
1695
1695
|
let seriesInactiveOpacity = series.highlight.inactiveOpacity;
|
|
1696
|
-
|
|
1696
|
+
|
|
1697
|
+
if (seriesInactiveOpacity !== undefined) {
|
|
1698
|
+
return seriesInactiveOpacity;
|
|
1699
|
+
}
|
|
1700
|
+
if (defaultInactiveOpacity !== undefined) {
|
|
1701
|
+
return defaultInactiveOpacity;
|
|
1702
|
+
}
|
|
1703
|
+
if (series.opacity !== undefined) {
|
|
1704
|
+
return series.opacity;
|
|
1705
|
+
}
|
|
1706
|
+
return DEFAULT_SERIES_OPACITY;
|
|
1697
1707
|
}
|
|
1698
1708
|
|
|
1699
1709
|
_getDefaultOpacityForSeries(series) {
|
|
@@ -22,6 +22,8 @@ class Highlight {
|
|
|
22
22
|
|
|
23
23
|
togglePointHighlight(point, show, opacity) {
|
|
24
24
|
const toggleHandler = (point.options.highlight || {}).toggle;
|
|
25
|
+
const highlight = point.options.highlight || {};
|
|
26
|
+
const pointInactiveOpacity = opacity !== undefined ? opacity : highlight.inactiveOpacity;
|
|
25
27
|
if (toggleHandler) {
|
|
26
28
|
const eventArgs = {
|
|
27
29
|
category: point.category,
|
|
@@ -35,17 +37,19 @@ class Highlight {
|
|
|
35
37
|
};
|
|
36
38
|
toggleHandler(eventArgs);
|
|
37
39
|
if (!eventArgs._defaultPrevented) {
|
|
38
|
-
point.toggleHighlight(show,
|
|
40
|
+
point.toggleHighlight(show, pointInactiveOpacity);
|
|
39
41
|
}
|
|
40
42
|
} else {
|
|
41
|
-
point.toggleHighlight(show,
|
|
43
|
+
point.toggleHighlight(show, pointInactiveOpacity);
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
hide() {
|
|
46
48
|
const points = this._points;
|
|
47
49
|
while (points.length) {
|
|
48
|
-
|
|
50
|
+
const point = points.pop();
|
|
51
|
+
const highlight = point.options.highlight || {};
|
|
52
|
+
this.togglePointHighlight(point, false, highlight.inactiveOpacity);
|
|
49
53
|
}
|
|
50
54
|
}
|
|
51
55
|
|
|
@@ -610,6 +610,10 @@ class DateCategoryAxis extends CategoryAxis {
|
|
|
610
610
|
|
|
611
611
|
if (range) {
|
|
612
612
|
if (range.min < totalLimits.min) {
|
|
613
|
+
if (scale < 0 && this.options.justified) {
|
|
614
|
+
const diff = dateDiff(totalLimits.min, range.min);
|
|
615
|
+
range.max = addTicks(range.max, diff);
|
|
616
|
+
}
|
|
613
617
|
range.min = totalLimits.min;
|
|
614
618
|
}
|
|
615
619
|
if (range.max > totalLimits.max) {
|