@progress/kendo-charts 2.8.0-develop.1 → 2.8.0-develop.2
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 -4
- package/dist/es/barcode/encodings/code128.js +1 -3
- package/dist/es/barcode/encodings/encoding.js +1 -3
- package/dist/es/chart/aggregates/aggregates.js +3 -3
- package/dist/es/chart/aggregates/default-aggregates.js +1 -5
- package/dist/es/chart/aggregates/series-aggregator.js +12 -10
- package/dist/es/chart/api-elements/chart-axis.js +1 -5
- package/dist/es/chart/api-elements/chart-plotarea.js +1 -5
- package/dist/es/chart/axis-group-range-tracker.js +1 -4
- package/dist/es/chart/categorical-chart.js +8 -8
- package/dist/es/chart/chart.js +2 -4
- package/dist/es/chart/error-bars/error-range-calculator.js +2 -4
- package/dist/es/chart/highlight.js +1 -5
- package/dist/es/chart/line-chart/line-chart.js +2 -2
- package/dist/es/chart/line-chart/line-point.js +19 -19
- package/dist/es/chart/mixins/accessibility-attributes-mixin.js +3 -4
- package/dist/es/chart/mixins/line-chart-mixin.js +1 -2
- package/dist/es/chart/mixins/note-mixin.js +1 -2
- package/dist/es/chart/pan-and-zoom/mousewheel-zoom.js +2 -4
- package/dist/es/chart/pan-and-zoom/pannable.js +2 -4
- package/dist/es/chart/pan-and-zoom/zoom-selection.js +2 -4
- package/dist/es/chart/plotarea/categorical-plotarea.js +2 -2
- package/dist/es/chart/plotarea/plotarea-factory.js +1 -5
- package/dist/es/chart/selection.js +2 -4
- package/dist/es/chart/series-binder.js +4 -8
- package/dist/es/chart/tooltip/base-tooltip.js +2 -4
- package/dist/es/common/getter.js +1 -3
- package/dist/es/common/grep.js +2 -11
- package/dist/es/common/in-array.js +1 -1
- package/dist/es/common/observable.js +1 -4
- package/dist/es/common/user-events.js +2 -6
- package/dist/es/core/box.js +38 -20
- package/dist/es/core/category-axis.js +5 -12
- package/dist/es/core/chart-element.js +8 -6
- package/dist/es/core/curve-processor.js +2 -5
- package/dist/es/core/point.js +2 -4
- package/dist/es/core/ring.js +2 -5
- package/dist/es/core/shape-builder.js +1 -2
- package/dist/es/core/utils/element-id.js +5 -0
- package/dist/es/core/utils/guid.js +4 -16
- package/dist/es/drawing-utils.js +0 -2
- package/dist/es/gauges/gauge.js +2 -5
- package/dist/es/gauges/pointer.js +2 -4
- package/dist/es/map/crs.js +5 -10
- package/dist/es/map/extent.js +1 -3
- package/dist/es/map/layers/bubble.js +1 -4
- package/dist/es/map/layers/layer.js +1 -4
- package/dist/es/map/layers/marker.js +1 -3
- package/dist/es/map/layers/shape.js +1 -3
- package/dist/es/map/layers/tile.js +3 -7
- package/dist/es/map/location.js +1 -4
- package/dist/es/map/scroller/draggable.js +1 -4
- package/dist/es/map/scroller/fx.js +1 -3
- package/dist/es/map/scroller/scroller.js +1 -4
- package/dist/es/map/tooltip/tooltip.js +2 -4
- package/dist/es/qrcode/encodings/data-modes/qr-data-mode.js +1 -4
- package/dist/es/qrcode/encodings/encoders/iso-encoder.js +1 -2
- package/dist/es/qrcode/encodings/encoders/utf8-encoder.js +1 -4
- package/dist/es/qrcode/encodings/encoding-result.js +1 -5
- package/dist/es/qrcode/encodings/free-cell-visitor.js +1 -5
- package/dist/es/qrcode/qrcode.js +1 -4
- package/dist/es/sankey/element.js +1 -3
- package/dist/es/stock/navigator-hint.js +2 -4
- package/dist/es/stock/navigator.js +2 -4
- package/dist/es2015/barcode/barcode.js +1 -4
- package/dist/es2015/barcode/encodings/code128.js +1 -3
- package/dist/es2015/barcode/encodings/encoding.js +1 -3
- package/dist/es2015/chart/aggregates/aggregates.js +3 -3
- package/dist/es2015/chart/aggregates/default-aggregates.js +1 -5
- package/dist/es2015/chart/aggregates/series-aggregator.js +12 -10
- package/dist/es2015/chart/api-elements/chart-axis.js +1 -5
- package/dist/es2015/chart/api-elements/chart-plotarea.js +1 -5
- package/dist/es2015/chart/axis-group-range-tracker.js +1 -4
- package/dist/es2015/chart/categorical-chart.js +8 -8
- package/dist/es2015/chart/chart.js +2 -4
- package/dist/es2015/chart/error-bars/error-range-calculator.js +2 -4
- package/dist/es2015/chart/highlight.js +1 -5
- package/dist/es2015/chart/line-chart/line-chart.js +2 -2
- package/dist/es2015/chart/line-chart/line-point.js +19 -19
- package/dist/es2015/chart/mixins/accessibility-attributes-mixin.js +3 -4
- package/dist/es2015/chart/mixins/line-chart-mixin.js +1 -2
- package/dist/es2015/chart/mixins/note-mixin.js +1 -2
- package/dist/es2015/chart/pan-and-zoom/mousewheel-zoom.js +2 -4
- package/dist/es2015/chart/pan-and-zoom/pannable.js +2 -4
- package/dist/es2015/chart/pan-and-zoom/zoom-selection.js +2 -4
- package/dist/es2015/chart/plotarea/categorical-plotarea.js +2 -2
- package/dist/es2015/chart/plotarea/plotarea-factory.js +1 -5
- package/dist/es2015/chart/selection.js +2 -4
- package/dist/es2015/chart/series-binder.js +4 -8
- package/dist/es2015/chart/tooltip/base-tooltip.js +2 -4
- package/dist/es2015/common/getter.js +1 -3
- package/dist/es2015/common/grep.js +2 -11
- package/dist/es2015/common/in-array.js +1 -1
- package/dist/es2015/common/observable.js +1 -4
- package/dist/es2015/common/user-events.js +2 -6
- package/dist/es2015/core/box.js +38 -20
- package/dist/es2015/core/category-axis.js +5 -12
- package/dist/es2015/core/chart-element.js +8 -6
- package/dist/es2015/core/curve-processor.js +2 -5
- package/dist/es2015/core/point.js +2 -4
- package/dist/es2015/core/ring.js +2 -5
- package/dist/es2015/core/shape-builder.js +1 -2
- package/dist/es2015/core/utils/element-id.js +5 -0
- package/dist/es2015/core/utils/guid.js +4 -16
- package/dist/es2015/drawing-utils.js +0 -2
- package/dist/es2015/gauges/gauge.js +2 -5
- package/dist/es2015/gauges/pointer.js +2 -4
- package/dist/es2015/map/crs.js +5 -10
- package/dist/es2015/map/extent.js +1 -3
- package/dist/es2015/map/layers/bubble.js +1 -4
- package/dist/es2015/map/layers/layer.js +1 -4
- package/dist/es2015/map/layers/marker.js +1 -3
- package/dist/es2015/map/layers/shape.js +1 -3
- package/dist/es2015/map/layers/tile.js +3 -7
- package/dist/es2015/map/location.js +1 -4
- package/dist/es2015/map/scroller/draggable.js +1 -4
- package/dist/es2015/map/scroller/fx.js +1 -3
- package/dist/es2015/map/scroller/scroller.js +1 -4
- package/dist/es2015/map/tooltip/tooltip.js +2 -4
- package/dist/es2015/qrcode/encodings/data-modes/qr-data-mode.js +1 -4
- package/dist/es2015/qrcode/encodings/encoders/iso-encoder.js +1 -2
- package/dist/es2015/qrcode/encodings/encoders/utf8-encoder.js +1 -4
- package/dist/es2015/qrcode/encodings/encoding-result.js +1 -5
- package/dist/es2015/qrcode/encodings/free-cell-visitor.js +1 -5
- package/dist/es2015/qrcode/qrcode.js +1 -4
- package/dist/es2015/sankey/element.js +1 -3
- package/dist/es2015/stock/navigator-hint.js +2 -4
- package/dist/es2015/stock/navigator.js +2 -4
- package/dist/npm/main.js +6372 -6890
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
|
@@ -2,12 +2,10 @@ import acceptKey from './accept-key';
|
|
|
2
2
|
import toChartAxisRanges from './to-chart-axis-ranges';
|
|
3
3
|
|
|
4
4
|
import { X, Y } from '../../common/constants';
|
|
5
|
-
import {
|
|
5
|
+
import { deepExtend, elementStyles, elementOffset, defined } from '../../common';
|
|
6
6
|
|
|
7
|
-
class ZoomSelection
|
|
7
|
+
class ZoomSelection {
|
|
8
8
|
constructor(chart, options) {
|
|
9
|
-
super();
|
|
10
|
-
|
|
11
9
|
this.chart = chart;
|
|
12
10
|
this.options = deepExtend({}, this.options, options);
|
|
13
11
|
this.createElement();
|
|
@@ -288,11 +288,11 @@ class CategoricalPlotArea extends PlotAreaBase {
|
|
|
288
288
|
category = parseDateCategory(category, srcData[idx], this.chartService.intl);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
if (
|
|
291
|
+
if (category === undefined) {
|
|
292
292
|
category = srcCategories[idx];
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
if (
|
|
295
|
+
if (category !== undefined && category !== null) {
|
|
296
296
|
const categoryIx = categoryAxis.totalIndex(category);
|
|
297
297
|
result[categoryIx] = result[categoryIx] || { items: [], category: category };
|
|
298
298
|
result[categoryIx].items.push(idx);
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import filterSeriesByType from '../utils/filter-series-by-type';
|
|
2
|
-
import { Class } from '../../common';
|
|
3
2
|
import { TRENDLINE_SERIES } from '../constants';
|
|
4
3
|
|
|
5
|
-
class PlotAreaFactory
|
|
6
|
-
|
|
4
|
+
class PlotAreaFactory {
|
|
7
5
|
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
|
|
10
6
|
this._registry = [];
|
|
11
7
|
}
|
|
12
8
|
|
|
@@ -5,7 +5,7 @@ import { DateCategoryAxis, Point } from '../core';
|
|
|
5
5
|
import { MOUSEWHEEL_DELAY, MOUSEWHEEL, SELECT_START, SELECT, SELECT_END } from './constants';
|
|
6
6
|
|
|
7
7
|
import { LEFT, RIGHT, MIN_VALUE, MAX_VALUE, X } from '../common/constants';
|
|
8
|
-
import { addClass,
|
|
8
|
+
import { addClass, removeClass, eventCoordinates, deepExtend, elementStyles, eventElement, setDefaultOptions, limitValue, round, bindEvents, unbindEvents, mousewheelDelta, hasClasses } from '../common';
|
|
9
9
|
import { parseDate } from '../date-utils';
|
|
10
10
|
|
|
11
11
|
const ZOOM_ACCELERATION = 3;
|
|
@@ -29,10 +29,8 @@ function closestHandle(element) {
|
|
|
29
29
|
return current;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
class Selection
|
|
32
|
+
class Selection {
|
|
33
33
|
constructor(chart, categoryAxis, options, observer) {
|
|
34
|
-
super();
|
|
35
|
-
|
|
36
34
|
const chartElement = chart.element;
|
|
37
35
|
|
|
38
36
|
this.options = deepExtend({}, this.options, options);
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import getField from './utils/get-field';
|
|
2
2
|
import { VALUE } from '../common/constants';
|
|
3
|
-
import { Class, defined } from '../common';
|
|
4
|
-
|
|
5
|
-
class SeriesBinder extends Class {
|
|
6
3
|
|
|
4
|
+
class SeriesBinder {
|
|
7
5
|
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
|
|
10
6
|
this._valueFields = {};
|
|
11
7
|
this._otherFields = {};
|
|
12
8
|
this._nullValue = {};
|
|
@@ -39,7 +35,7 @@ class SeriesBinder extends Class {
|
|
|
39
35
|
|
|
40
36
|
bindPoint(series, pointIx, item) {
|
|
41
37
|
const data = series.data;
|
|
42
|
-
const pointData =
|
|
38
|
+
const pointData = item !== undefined ? item : data[pointIx];
|
|
43
39
|
const result = { valueFields: { value: pointData } };
|
|
44
40
|
const valueFields = this.valueFields(series);
|
|
45
41
|
const otherFields = this._otherFields[series.type];
|
|
@@ -47,7 +43,7 @@ class SeriesBinder extends Class {
|
|
|
47
43
|
|
|
48
44
|
if (pointData === null) {
|
|
49
45
|
value = this._nullValue[series.type];
|
|
50
|
-
} else if (
|
|
46
|
+
} else if (pointData === undefined) {
|
|
51
47
|
value = this._undefinedValue[series.type];
|
|
52
48
|
} else if (Array.isArray(pointData)) {
|
|
53
49
|
const fieldData = pointData.slice(valueFields.length);
|
|
@@ -61,7 +57,7 @@ class SeriesBinder extends Class {
|
|
|
61
57
|
fields = this._bindFromObject(pointData, otherFields, srcPointFields);
|
|
62
58
|
}
|
|
63
59
|
|
|
64
|
-
if (
|
|
60
|
+
if (value !== undefined) {
|
|
65
61
|
if (valueFields.length === 1) {
|
|
66
62
|
result.valueFields.value = value[valueFields[0]];
|
|
67
63
|
} else {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Color } from '@progress/kendo-drawing';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { defined, deepExtend, setDefaultOptions, valueOrDefault, getSpacing, styleValue } from '../../common';
|
|
4
4
|
import { SHOW_TOOLTIP, HIDE_TOOLTIP } from '../constants';
|
|
5
5
|
|
|
6
|
-
class BaseTooltip
|
|
6
|
+
class BaseTooltip {
|
|
7
7
|
constructor(chartService, options) {
|
|
8
|
-
super();
|
|
9
|
-
|
|
10
8
|
this.chartService = chartService;
|
|
11
9
|
this.options = deepExtend({}, this.options, options);
|
|
12
10
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { drawing } from '@progress/kendo-drawing';
|
|
2
|
-
|
|
3
1
|
const FIELD_REGEX = /\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;
|
|
4
2
|
const getterCache = {};
|
|
5
3
|
|
|
@@ -14,7 +12,7 @@ export default function getter(field) {
|
|
|
14
12
|
|
|
15
13
|
const fields = [];
|
|
16
14
|
field.replace(FIELD_REGEX, function(match, index, indexAccessor, field) {
|
|
17
|
-
fields.push(
|
|
15
|
+
fields.push(index !== undefined ? index : (indexAccessor || field));
|
|
18
16
|
});
|
|
19
17
|
|
|
20
18
|
getterCache[field] = function(obj) {
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const result = [];
|
|
4
|
-
for (let idx = 0; idx < length; idx++) {
|
|
5
|
-
if (callback(array[idx])) {
|
|
6
|
-
result .push(array[idx]);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return result;
|
|
11
|
-
}
|
|
1
|
+
const grep = (array, callback) => array.filter(callback);
|
|
2
|
+
export default grep;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Class } from '../drawing-utils';
|
|
2
|
-
|
|
3
1
|
const STRING = "string";
|
|
4
2
|
const FUNCTION = "function";
|
|
5
3
|
|
|
@@ -11,9 +9,8 @@ let isDefaultPrevented = function() {
|
|
|
11
9
|
return this._defaultPrevented === true;
|
|
12
10
|
};
|
|
13
11
|
|
|
14
|
-
export default class Observable
|
|
12
|
+
export default class Observable {
|
|
15
13
|
constructor() {
|
|
16
|
-
super();
|
|
17
14
|
this._events = {};
|
|
18
15
|
}
|
|
19
16
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Class } from '../drawing-utils';
|
|
2
1
|
import { applyEventMap, eventMap } from './event-map';
|
|
3
2
|
import { on, off } from './event-utils';
|
|
4
3
|
import getSupportedFeatures from './get-supported-features';
|
|
@@ -83,9 +82,8 @@ function getTouches(e) {
|
|
|
83
82
|
|
|
84
83
|
return touches;
|
|
85
84
|
}
|
|
86
|
-
class TouchAxis
|
|
85
|
+
class TouchAxis {
|
|
87
86
|
constructor(axis, location) {
|
|
88
|
-
super();
|
|
89
87
|
let that = this;
|
|
90
88
|
|
|
91
89
|
that.support = getSupportedFeatures();
|
|
@@ -124,10 +122,8 @@ class TouchAxis extends Class {
|
|
|
124
122
|
}
|
|
125
123
|
}
|
|
126
124
|
|
|
127
|
-
class Touch
|
|
125
|
+
class Touch {
|
|
128
126
|
constructor(userEvents, target, touchInfo) {
|
|
129
|
-
super();
|
|
130
|
-
|
|
131
127
|
extend(this, {
|
|
132
128
|
x: new TouchAxis('X', touchInfo.location),
|
|
133
129
|
y: new TouchAxis('Y', touchInfo.location),
|
package/dist/es2015/core/box.js
CHANGED
|
@@ -2,13 +2,11 @@ import { geometry as geom } from '@progress/kendo-drawing';
|
|
|
2
2
|
|
|
3
3
|
import Point from './point';
|
|
4
4
|
|
|
5
|
-
import { X, Y, TOP, BOTTOM, LEFT, RIGHT, CENTER
|
|
6
|
-
import {
|
|
5
|
+
import { X, Y, TOP, BOTTOM, LEFT, RIGHT, CENTER } from '../common/constants';
|
|
6
|
+
import { getSpacing, isArray, rad } from '../common';
|
|
7
7
|
|
|
8
|
-
class Box
|
|
8
|
+
class Box {
|
|
9
9
|
constructor(x1, y1, x2, y2) {
|
|
10
|
-
super();
|
|
11
|
-
|
|
12
10
|
this.x1 = x1 || 0;
|
|
13
11
|
this.y1 = y1 || 0;
|
|
14
12
|
this.x2 = x2 || 0;
|
|
@@ -41,12 +39,12 @@ class Box extends Class {
|
|
|
41
39
|
const height = this.height();
|
|
42
40
|
const width = this.width();
|
|
43
41
|
|
|
44
|
-
if (
|
|
42
|
+
if (x !== undefined) {
|
|
45
43
|
this.x1 = x;
|
|
46
44
|
this.x2 = this.x1 + width;
|
|
47
45
|
}
|
|
48
46
|
|
|
49
|
-
if (
|
|
47
|
+
if (y !== undefined) {
|
|
50
48
|
this.y1 = y;
|
|
51
49
|
this.y2 = this.y1 + height;
|
|
52
50
|
}
|
|
@@ -217,20 +215,40 @@ class Box extends Class {
|
|
|
217
215
|
}
|
|
218
216
|
|
|
219
217
|
align(targetBox, axis, alignment) {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
218
|
+
if (axis === X) {
|
|
219
|
+
this.alignX(targetBox, alignment);
|
|
220
|
+
} else {
|
|
221
|
+
this.alignY(targetBox, alignment);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
return this;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
alignX(targetBox, alignment) {
|
|
228
|
+
const width = this.width();
|
|
229
|
+
if (alignment === LEFT) {
|
|
230
|
+
this.x1 = targetBox.x1;
|
|
231
|
+
this.x2 = this.x1 + width;
|
|
232
|
+
} else if (alignment === RIGHT) {
|
|
233
|
+
this.x2 = targetBox.x2;
|
|
234
|
+
this.x1 = this.x2 - width;
|
|
231
235
|
} else if (alignment === CENTER) {
|
|
232
|
-
this
|
|
233
|
-
this
|
|
236
|
+
this.x1 = targetBox.x1 + (targetBox.width() - width) / 2;
|
|
237
|
+
this.x2 = this.x1 + width;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
alignY(targetBox, alignment) {
|
|
242
|
+
const height = this.height();
|
|
243
|
+
if (alignment === TOP) {
|
|
244
|
+
this.y1 = targetBox.y1;
|
|
245
|
+
this.y2 = this.y1 + height;
|
|
246
|
+
} else if (alignment === BOTTOM) {
|
|
247
|
+
this.y2 = targetBox.y2;
|
|
248
|
+
this.y1 = this.y2 - height;
|
|
249
|
+
} else if (alignment === CENTER) {
|
|
250
|
+
this.y1 = targetBox.y1 + (targetBox.height() - height) / 2;
|
|
251
|
+
this.y2 = this.y1 + height;
|
|
234
252
|
}
|
|
235
253
|
}
|
|
236
254
|
}
|
|
@@ -2,7 +2,7 @@ import Axis from './axis';
|
|
|
2
2
|
import AxisLabel from './axis-label';
|
|
3
3
|
|
|
4
4
|
import { BLACK, COORD_PRECISION, DEFAULT_PRECISION, X, Y } from '../common/constants';
|
|
5
|
-
import {
|
|
5
|
+
import { isNumber, last, limitValue, round, setDefaultOptions, valueOrDefault, HashMap } from '../common';
|
|
6
6
|
import { dateEquals } from '../date-utils';
|
|
7
7
|
|
|
8
8
|
const MIN_CATEGORY_POINTS_RANGE = 0.01;
|
|
@@ -10,14 +10,7 @@ const MIN_CATEGORY_RANGE = 0.1;
|
|
|
10
10
|
|
|
11
11
|
function indexOf(value, arr) {
|
|
12
12
|
if (value instanceof Date) {
|
|
13
|
-
|
|
14
|
-
for (let idx = 0; idx < length; idx++) {
|
|
15
|
-
if (dateEquals(arr[idx], value)) {
|
|
16
|
-
return idx;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return -1;
|
|
13
|
+
return arr.findIndex((item) => dateEquals(item, value));
|
|
21
14
|
}
|
|
22
15
|
|
|
23
16
|
return arr.indexOf(value);
|
|
@@ -43,8 +36,8 @@ class CategoryAxis extends Axis {
|
|
|
43
36
|
|
|
44
37
|
initUserOptions(options) {
|
|
45
38
|
const categories = options.categories || [];
|
|
46
|
-
const definedMin =
|
|
47
|
-
const definedMax =
|
|
39
|
+
const definedMin = options.min !== undefined;
|
|
40
|
+
const definedMax = options.max !== undefined;
|
|
48
41
|
options.srcCategories = options.categories = categories;
|
|
49
42
|
|
|
50
43
|
if ((definedMin || definedMax) && categories.length) {
|
|
@@ -259,7 +252,7 @@ class CategoryAxis extends Axis {
|
|
|
259
252
|
const { axis: valueAxis, lineStart } = this.lineInfo();
|
|
260
253
|
|
|
261
254
|
const slotBox = box.clone();
|
|
262
|
-
const singleSlot =
|
|
255
|
+
const singleSlot = to === undefined;
|
|
263
256
|
|
|
264
257
|
const start = valueOrDefault(from, 0);
|
|
265
258
|
let end = valueOrDefault(to, start);
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { drawing as draw } from '@progress/kendo-drawing';
|
|
2
2
|
|
|
3
3
|
import { WHITE } from '../common/constants';
|
|
4
|
-
import {
|
|
4
|
+
import { deepExtend, valueOrDefault, autoTextColor } from '../common';
|
|
5
5
|
|
|
6
|
-
class ChartElement
|
|
6
|
+
class ChartElement {
|
|
7
7
|
constructor(options) {
|
|
8
|
-
super();
|
|
9
|
-
|
|
10
8
|
this.children = [];
|
|
11
9
|
|
|
10
|
+
this.initOptions(options);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
initOptions(options) {
|
|
12
14
|
this.options = deepExtend({}, this.options, this.initUserOptions(options));
|
|
13
15
|
}
|
|
14
16
|
|
|
@@ -137,7 +139,7 @@ class ChartElement extends Class {
|
|
|
137
139
|
|
|
138
140
|
if (childVisual.options.noclip) {
|
|
139
141
|
this.clipRoot().visual.append(childVisual);
|
|
140
|
-
} else if (
|
|
142
|
+
} else if (childVisual.options.zIndex !== undefined) {
|
|
141
143
|
this.stackRoot().stackVisual(childVisual);
|
|
142
144
|
} else if (this.isStackRoot) {
|
|
143
145
|
this.stackVisual(childVisual);
|
|
@@ -261,7 +263,7 @@ class ChartElement extends Class {
|
|
|
261
263
|
highlight = this._highlight = this.createHighlight(highlightOptions);
|
|
262
264
|
}
|
|
263
265
|
|
|
264
|
-
if (
|
|
266
|
+
if (highlight.options.zIndex === undefined) {
|
|
265
267
|
highlight.options.zIndex = valueOrDefault(options.zIndex, this.options.zIndex);
|
|
266
268
|
}
|
|
267
269
|
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { geometry as geom } from '@progress/kendo-drawing';
|
|
2
2
|
|
|
3
3
|
import { X, Y } from '../common/constants';
|
|
4
|
-
import {
|
|
4
|
+
import { last, round } from '../common';
|
|
5
5
|
|
|
6
6
|
const WEIGHT = 0.333;
|
|
7
7
|
const EXTREMUM_ALLOWED_DEVIATION = 0.01;
|
|
8
8
|
|
|
9
|
-
class CurveProcessor
|
|
10
|
-
|
|
9
|
+
class CurveProcessor {
|
|
11
10
|
constructor(closed) {
|
|
12
|
-
super();
|
|
13
|
-
|
|
14
11
|
this.closed = closed;
|
|
15
12
|
}
|
|
16
13
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { COORD_PRECISION } from '../common/constants';
|
|
2
|
-
import {
|
|
2
|
+
import { rad, round } from '../common';
|
|
3
3
|
|
|
4
|
-
class Point
|
|
4
|
+
class Point {
|
|
5
5
|
constructor(x, y) {
|
|
6
|
-
super();
|
|
7
|
-
|
|
8
6
|
this.x = x || 0;
|
|
9
7
|
this.y = y || 0;
|
|
10
8
|
}
|
package/dist/es2015/core/ring.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import Box from './box';
|
|
2
2
|
import Point from './point';
|
|
3
3
|
import { COORD_PRECISION, MAX_VALUE, MIN_VALUE } from '../common/constants';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
class Ring extends Class {
|
|
4
|
+
import { clockwise, rad, round } from '../common';
|
|
7
5
|
|
|
6
|
+
class Ring {
|
|
8
7
|
constructor(center, innerRadius, radius, startAngle, angle) {
|
|
9
|
-
super();
|
|
10
|
-
|
|
11
8
|
this.center = center;
|
|
12
9
|
this.innerRadius = innerRadius;
|
|
13
10
|
this.radius = radius;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { geometry as geom, drawing as draw } from '@progress/kendo-drawing';
|
|
2
|
-
import { Class } from '../common';
|
|
3
2
|
|
|
4
3
|
const DIRECTION_ANGLE = 0.001; //any value that will make the endAngle bigger than the start angle will work here.
|
|
5
4
|
|
|
6
|
-
class ShapeBuilder
|
|
5
|
+
class ShapeBuilder {
|
|
7
6
|
createRing(sector, options) {
|
|
8
7
|
const startAngle = sector.startAngle + 180;
|
|
9
8
|
let endAngle = sector.angle + startAngle;
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
let id = "";
|
|
3
|
-
let i;
|
|
4
|
-
let random;
|
|
5
|
-
|
|
6
|
-
for (i = 0; i < 32; i++) {
|
|
7
|
-
random = Math.random() * 16 | 0;
|
|
8
|
-
|
|
9
|
-
if (i === 8 || i === 12 || i === 16 || i === 20) {
|
|
10
|
-
id += "-";
|
|
11
|
-
}
|
|
1
|
+
import elementId from "./element-id";
|
|
12
2
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return id;
|
|
17
|
-
}
|
|
3
|
+
export default function guid() {
|
|
4
|
+
return elementId();
|
|
5
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { geometry as geo, drawing } from '@progress/kendo-drawing';
|
|
2
|
-
import {
|
|
2
|
+
import { elementSize, setDefaultOptions, deepExtend, isArray, isNumber } from '../common';
|
|
3
3
|
import { DEFAULT_WIDTH, DEFAULT_HEIGHT } from './constants';
|
|
4
4
|
import { ChartService } from '../services';
|
|
5
5
|
import { unpad } from './utils';
|
|
@@ -7,11 +7,8 @@ import { unpad } from './utils';
|
|
|
7
7
|
const DEFAULT_MARGIN = 5;
|
|
8
8
|
const { Path, Surface } = drawing;
|
|
9
9
|
|
|
10
|
-
class Gauge
|
|
11
|
-
|
|
10
|
+
class Gauge {
|
|
12
11
|
constructor(element, userOptions, theme, context = {}) {
|
|
13
|
-
super();
|
|
14
|
-
|
|
15
12
|
this.element = element;
|
|
16
13
|
this.theme = theme;
|
|
17
14
|
this.contextService = new ChartService(this, context);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { setDefaultOptions, defined, deepExtend, limitValue } from '../common';
|
|
2
2
|
import { BLACK } from '../common/constants';
|
|
3
3
|
|
|
4
|
-
class Pointer
|
|
4
|
+
class Pointer {
|
|
5
5
|
constructor(scale, userOptions) {
|
|
6
|
-
super();
|
|
7
|
-
|
|
8
6
|
const { min, max } = scale.options;
|
|
9
7
|
const options = this.options = deepExtend({}, this.options, userOptions);
|
|
10
8
|
|
package/dist/es2015/map/crs.js
CHANGED
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
} from '@progress/kendo-drawing';
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
Class,
|
|
7
6
|
setDefaultOptions,
|
|
8
7
|
limitValue,
|
|
9
8
|
rad,
|
|
@@ -37,9 +36,8 @@ let PI = math.PI,
|
|
|
37
36
|
let WGS84 = datums.WGS84;
|
|
38
37
|
|
|
39
38
|
// WGS 84 / World Mercator
|
|
40
|
-
export class Mercator
|
|
39
|
+
export class Mercator {
|
|
41
40
|
constructor(options) {
|
|
42
|
-
super();
|
|
43
41
|
this.initProperties();
|
|
44
42
|
this._initOptions(options);
|
|
45
43
|
}
|
|
@@ -150,7 +148,7 @@ export class SphericalMercator extends Mercator {
|
|
|
150
148
|
}
|
|
151
149
|
}
|
|
152
150
|
|
|
153
|
-
export class Equirectangular
|
|
151
|
+
export class Equirectangular {
|
|
154
152
|
forward(loc) {
|
|
155
153
|
return new Point(loc.lng, loc.lat);
|
|
156
154
|
}
|
|
@@ -167,9 +165,8 @@ export class Equirectangular extends Class {
|
|
|
167
165
|
// Area of use: World between 85.06°S and 85.06°N.
|
|
168
166
|
// Coordinate system: Cartesian 2D CS. Axes: easting, northing (X,Y). Orientations: east, north. UoM: m.
|
|
169
167
|
// https://epsg.io/3857
|
|
170
|
-
export class EPSG3857
|
|
168
|
+
export class EPSG3857 {
|
|
171
169
|
constructor() {
|
|
172
|
-
super();
|
|
173
170
|
let crs = this,
|
|
174
171
|
proj = crs._proj = new SphericalMercator();
|
|
175
172
|
let c = this.c = 2 * PI * proj.options.datum.a;
|
|
@@ -200,9 +197,8 @@ export class EPSG3857 extends Class {
|
|
|
200
197
|
// Area of use: World between 80°S and 84°N.
|
|
201
198
|
// Coordinate system: Cartesian 2D CS. Axes: easting, northing (E,N). Orientations: east, north. UoM: m.
|
|
202
199
|
// https://epsg.io/3395
|
|
203
|
-
export class EPSG3395
|
|
200
|
+
export class EPSG3395 {
|
|
204
201
|
constructor() {
|
|
205
|
-
super();
|
|
206
202
|
this._proj = new Mercator();
|
|
207
203
|
}
|
|
208
204
|
toPoint(loc) {
|
|
@@ -219,9 +215,8 @@ export class EPSG3395 extends Class {
|
|
|
219
215
|
// Area of use: World.
|
|
220
216
|
// Coordinate system: Ellipsoidal 2D CS. Axes: latitude, longitude. Orientations: north, east. UoM: degree
|
|
221
217
|
// https://epsg.io/4326
|
|
222
|
-
export class EPSG4326
|
|
218
|
+
export class EPSG4326 {
|
|
223
219
|
constructor() {
|
|
224
|
-
super();
|
|
225
220
|
this._proj = new Equirectangular();
|
|
226
221
|
}
|
|
227
222
|
toPoint(loc) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Class,
|
|
3
2
|
valueOrDefault
|
|
4
3
|
} from '../common';
|
|
5
4
|
|
|
@@ -9,9 +8,8 @@ let math = Math,
|
|
|
9
8
|
max = math.max,
|
|
10
9
|
min = math.min;
|
|
11
10
|
|
|
12
|
-
export class Extent
|
|
11
|
+
export class Extent {
|
|
13
12
|
constructor(initialNw, initialSe) {
|
|
14
|
-
super();
|
|
15
13
|
let nw = Location.create(initialNw);
|
|
16
14
|
let se = Location.create(initialSe);
|
|
17
15
|
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
} from '@progress/kendo-drawing';
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
|
-
Class,
|
|
8
7
|
defined,
|
|
9
8
|
isFunction,
|
|
10
9
|
getter,
|
|
@@ -149,10 +148,8 @@ setDefaultOptions(BubbleLayer, {
|
|
|
149
148
|
zIndex: 200
|
|
150
149
|
});
|
|
151
150
|
|
|
152
|
-
class SqrtScale
|
|
151
|
+
class SqrtScale {
|
|
153
152
|
constructor(domain, range) {
|
|
154
|
-
super();
|
|
155
|
-
|
|
156
153
|
this._domain = domain;
|
|
157
154
|
this._range = range;
|
|
158
155
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Class,
|
|
3
2
|
addClass,
|
|
4
3
|
deepExtend,
|
|
5
4
|
defined,
|
|
@@ -10,10 +9,8 @@ import {
|
|
|
10
9
|
Extent
|
|
11
10
|
} from './../extent';
|
|
12
11
|
|
|
13
|
-
export class Layer
|
|
12
|
+
export class Layer {
|
|
14
13
|
constructor(map, options) {
|
|
15
|
-
super();
|
|
16
|
-
|
|
17
14
|
this.support = getSupportedFeatures();
|
|
18
15
|
|
|
19
16
|
this._initOptions(options);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Class,
|
|
3
2
|
addClass,
|
|
4
3
|
isArray,
|
|
5
4
|
getter,
|
|
@@ -189,9 +188,8 @@ setDefaultOptions(MarkerLayer, {
|
|
|
189
188
|
template: ""
|
|
190
189
|
});
|
|
191
190
|
|
|
192
|
-
export class Marker
|
|
191
|
+
export class Marker {
|
|
193
192
|
constructor(options) {
|
|
194
|
-
super();
|
|
195
193
|
this.options = options || {};
|
|
196
194
|
}
|
|
197
195
|
|