@progress/kendo-charts 1.19.0-dev.202108250812 → 1.19.1-dev.202110081424
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/barcode/barcode.js +1 -0
- package/dist/es/barcode.js +0 -2
- package/dist/es/chart/plotarea/heatmap-plotarea.js +6 -5
- package/dist/es/common/create-hash-set.js +100 -0
- package/dist/es/common.js +1 -0
- package/dist/es2015/barcode/barcode.js +1 -0
- package/dist/es2015/barcode.js +0 -2
- package/dist/es2015/chart/plotarea/heatmap-plotarea.js +6 -5
- package/dist/es2015/common/create-hash-set.js +94 -0
- package/dist/es2015/common.js +1 -0
- package/dist/npm/main.js +109 -7
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +3 -2
package/dist/es/barcode.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { deepExtend, eventElement, grep, inArray, setDefaultOptions } from '../../common';
|
|
1
|
+
import { deepExtend, eventElement, grep, inArray, setDefaultOptions, createHashSet } from '../../common';
|
|
2
2
|
import { DATE } from '../../common/constants';
|
|
3
3
|
import { CategoryAxis, DateCategoryAxis, Point } from '../../core';
|
|
4
4
|
import { HEATMAP } from '../constants';
|
|
@@ -43,8 +43,9 @@ var HeatmapPlotArea = (function (PlotAreaBase) {
|
|
|
43
43
|
var ref = this$1.seriesAxes(currentSeries);
|
|
44
44
|
var xAxis = ref.xAxis;
|
|
45
45
|
var yAxis = ref.yAxis;
|
|
46
|
-
|
|
47
|
-
var
|
|
46
|
+
|
|
47
|
+
var xCategories = createHashSet(xAxis.categories || []);
|
|
48
|
+
var yCategories = createHashSet(yAxis.categories || []);
|
|
48
49
|
|
|
49
50
|
for (var pointIndex = 0; pointIndex < data.length; pointIndex++) {
|
|
50
51
|
var ref$1 = SeriesBinder.current.bindPoint(currentSeries, pointIndex).valueFields;
|
|
@@ -60,8 +61,8 @@ var HeatmapPlotArea = (function (PlotAreaBase) {
|
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
|
|
63
|
-
xAxis.categories =
|
|
64
|
-
yAxis.categories =
|
|
64
|
+
xAxis.categories = xCategories.values();
|
|
65
|
+
yAxis.categories = yCategories.values();
|
|
65
66
|
}
|
|
66
67
|
};
|
|
67
68
|
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
var DELETED = {};
|
|
2
|
+
|
|
3
|
+
var LegacySet = function LegacySet(values) {
|
|
4
|
+
var this$1 = this;
|
|
5
|
+
|
|
6
|
+
this._index = {};
|
|
7
|
+
this._values = values ? values.slice(0) : [];
|
|
8
|
+
|
|
9
|
+
for (var i = 0; i < this._values.length; i++) {
|
|
10
|
+
this$1._index[this$1._values[i]] = i;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
var prototypeAccessors = { size: { configurable: true } };
|
|
15
|
+
|
|
16
|
+
LegacySet.prototype.values = function values () {
|
|
17
|
+
return this._values.filter(function (item) { return item !== DELETED; });
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
LegacySet.prototype.has = function has (value) {
|
|
21
|
+
return this._index[value] !== undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
LegacySet.prototype.add = function add (value) {
|
|
25
|
+
if (!this.has(value)) {
|
|
26
|
+
this._index[value] = this._values.length;
|
|
27
|
+
this._values.push(value);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
LegacySet.prototype.delete = function delete$1 (value) {
|
|
32
|
+
var index = this._index[value];
|
|
33
|
+
if (index !== undefined) {
|
|
34
|
+
this._values[index] = DELETED;
|
|
35
|
+
delete this._index[value];
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
LegacySet.prototype.clear = function clear () {
|
|
40
|
+
this._index = {};
|
|
41
|
+
this._values = [];
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
prototypeAccessors.size.get = function () {
|
|
45
|
+
return this._values.length;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
Object.defineProperties( LegacySet.prototype, prototypeAccessors );
|
|
49
|
+
|
|
50
|
+
var SetWrapper = function SetWrapper(values) {
|
|
51
|
+
this._set = new Set(values);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
var prototypeAccessors$1 = { size: { configurable: true } };
|
|
55
|
+
|
|
56
|
+
SetWrapper.prototype.values = function values () {
|
|
57
|
+
return Array.from(this._set);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
SetWrapper.prototype.has = function has (value) {
|
|
61
|
+
return this._set.has(value);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
SetWrapper.prototype.add = function add (value) {
|
|
65
|
+
this._set.add(value);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
SetWrapper.prototype.delete = function delete$2 (value) {
|
|
69
|
+
this._set.delete(value);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
SetWrapper.prototype.clear = function clear () {
|
|
73
|
+
this._set.clear();
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
prototypeAccessors$1.size.get = function () {
|
|
77
|
+
return this._set.size;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
Object.defineProperties( SetWrapper.prototype, prototypeAccessors$1 );
|
|
81
|
+
|
|
82
|
+
// TODO: Drop LegacySet when removing support for IE10
|
|
83
|
+
var supportsSet = function () {
|
|
84
|
+
var supported = false;
|
|
85
|
+
|
|
86
|
+
if (typeof Set === 'function') {
|
|
87
|
+
var set = new Set([1]);
|
|
88
|
+
supported = set.has(1);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return supported;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export default function createHashSet(values) {
|
|
95
|
+
if (supportsSet()) {
|
|
96
|
+
return new SetWrapper(values);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return new LegacySet(values);
|
|
100
|
+
}
|
package/dist/es/common.js
CHANGED
|
@@ -28,5 +28,6 @@ export { default as styleValue } from './common/style-value';
|
|
|
28
28
|
export { default as find } from './common/find';
|
|
29
29
|
export { default as elementScale } from './common/element-scale';
|
|
30
30
|
export { default as autoTextColor } from './common/auto-text-color';
|
|
31
|
+
export { default as createHashSet } from './common/create-hash-set';
|
|
31
32
|
|
|
32
33
|
export * from './drawing-utils';
|
package/dist/es2015/barcode.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { deepExtend, eventElement, grep, inArray, setDefaultOptions } from '../../common';
|
|
1
|
+
import { deepExtend, eventElement, grep, inArray, setDefaultOptions, createHashSet } from '../../common';
|
|
2
2
|
import { DATE } from '../../common/constants';
|
|
3
3
|
import { CategoryAxis, DateCategoryAxis, Point } from '../../core';
|
|
4
4
|
import { HEATMAP } from '../constants';
|
|
@@ -29,8 +29,9 @@ class HeatmapPlotArea extends PlotAreaBase {
|
|
|
29
29
|
const currentSeries = series[i];
|
|
30
30
|
const data = currentSeries.data || [];
|
|
31
31
|
const { xAxis, yAxis } = this.seriesAxes(currentSeries);
|
|
32
|
-
|
|
33
|
-
const
|
|
32
|
+
|
|
33
|
+
const xCategories = createHashSet(xAxis.categories || []);
|
|
34
|
+
const yCategories = createHashSet(yAxis.categories || []);
|
|
34
35
|
|
|
35
36
|
for (let pointIndex = 0; pointIndex < data.length; pointIndex++) {
|
|
36
37
|
const { x, y } = SeriesBinder.current.bindPoint(currentSeries, pointIndex).valueFields;
|
|
@@ -44,8 +45,8 @@ class HeatmapPlotArea extends PlotAreaBase {
|
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
xAxis.categories =
|
|
48
|
-
yAxis.categories =
|
|
48
|
+
xAxis.categories = xCategories.values();
|
|
49
|
+
yAxis.categories = yCategories.values();
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
const DELETED = {};
|
|
2
|
+
|
|
3
|
+
class LegacySet {
|
|
4
|
+
constructor(values) {
|
|
5
|
+
this._index = {};
|
|
6
|
+
this._values = values ? values.slice(0) : [];
|
|
7
|
+
|
|
8
|
+
for (let i = 0; i < this._values.length; i++) {
|
|
9
|
+
this._index[this._values[i]] = i;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
values() {
|
|
14
|
+
return this._values.filter(item => item !== DELETED);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
has(value) {
|
|
18
|
+
return this._index[value] !== undefined;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
add(value) {
|
|
22
|
+
if (!this.has(value)) {
|
|
23
|
+
this._index[value] = this._values.length;
|
|
24
|
+
this._values.push(value);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
delete(value) {
|
|
29
|
+
const index = this._index[value];
|
|
30
|
+
if (index !== undefined) {
|
|
31
|
+
this._values[index] = DELETED;
|
|
32
|
+
delete this._index[value];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
clear() {
|
|
37
|
+
this._index = {};
|
|
38
|
+
this._values = [];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
get size() {
|
|
42
|
+
return this._values.length;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
class SetWrapper {
|
|
47
|
+
constructor(values) {
|
|
48
|
+
this._set = new Set(values);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
values() {
|
|
52
|
+
return Array.from(this._set);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
has(value) {
|
|
56
|
+
return this._set.has(value);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
add(value) {
|
|
60
|
+
this._set.add(value);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
delete(value) {
|
|
64
|
+
this._set.delete(value);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
clear() {
|
|
68
|
+
this._set.clear();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
get size() {
|
|
72
|
+
return this._set.size;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// TODO: Drop LegacySet when removing support for IE10
|
|
77
|
+
let supportsSet = () => {
|
|
78
|
+
let supported = false;
|
|
79
|
+
|
|
80
|
+
if (typeof Set === 'function') {
|
|
81
|
+
const set = new Set([1]);
|
|
82
|
+
supported = set.has(1);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return supported;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export default function createHashSet(values) {
|
|
89
|
+
if (supportsSet()) {
|
|
90
|
+
return new SetWrapper(values);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return new LegacySet(values);
|
|
94
|
+
}
|
package/dist/es2015/common.js
CHANGED
|
@@ -28,5 +28,6 @@ export { default as styleValue } from './common/style-value';
|
|
|
28
28
|
export { default as find } from './common/find';
|
|
29
29
|
export { default as elementScale } from './common/element-scale';
|
|
30
30
|
export { default as autoTextColor } from './common/auto-text-color';
|
|
31
|
+
export { default as createHashSet } from './common/create-hash-set';
|
|
31
32
|
|
|
32
33
|
export * from './drawing-utils';
|