@progress/kendo-charts 2.7.3-develop.2 → 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 +9 -8
- 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/clip-animation-mixin.js +6 -5
- 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 +9 -8
- 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/clip-animation-mixin.js +6 -5
- 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 +6378 -6892
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Class,
|
|
3
2
|
Observable,
|
|
4
3
|
elementOffset,
|
|
5
4
|
eventMap
|
|
@@ -228,10 +227,8 @@ export class PaneAxis extends Observable {
|
|
|
228
227
|
}
|
|
229
228
|
}
|
|
230
229
|
|
|
231
|
-
export class Pane
|
|
230
|
+
export class Pane {
|
|
232
231
|
constructor(options) {
|
|
233
|
-
super();
|
|
234
|
-
|
|
235
232
|
let that = this,
|
|
236
233
|
x, y,
|
|
237
234
|
resistance,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Class,
|
|
3
2
|
now
|
|
4
3
|
} from '../../common';
|
|
5
4
|
|
|
@@ -13,9 +12,8 @@ function animationFrame(callback) {
|
|
|
13
12
|
window.requestAnimationFrame(callback);
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
export class Animation
|
|
15
|
+
export class Animation {
|
|
17
16
|
constructor() {
|
|
18
|
-
super();
|
|
19
17
|
let that = this;
|
|
20
18
|
|
|
21
19
|
that._tickProxy = proxy(that._tick, that);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// todo: extract to a separate place
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
Class,
|
|
5
4
|
deepExtend,
|
|
6
5
|
addClass,
|
|
7
6
|
Observable,
|
|
@@ -244,9 +243,8 @@ class AnimatedScroller extends Animation {
|
|
|
244
243
|
}
|
|
245
244
|
}
|
|
246
245
|
|
|
247
|
-
class ScrollBar
|
|
246
|
+
class ScrollBar {
|
|
248
247
|
constructor(options) {
|
|
249
|
-
super();
|
|
250
248
|
let that = this,
|
|
251
249
|
horizontal = options.axis === 'x';
|
|
252
250
|
|
|
@@ -310,7 +308,6 @@ class ScrollBar extends Class {
|
|
|
310
308
|
}
|
|
311
309
|
}
|
|
312
310
|
|
|
313
|
-
// export class Scroller extends Class {
|
|
314
311
|
export class Scroller extends Observable {
|
|
315
312
|
constructor(element, options) {
|
|
316
313
|
super();
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { deepExtend, setDefaultOptions } from '../../common';
|
|
2
2
|
import { SHOW_TOOLTIP, HIDE_TOOLTIP } from '../constants';
|
|
3
3
|
|
|
4
|
-
export class Tooltip
|
|
4
|
+
export class Tooltip {
|
|
5
5
|
constructor(widgetService, options) {
|
|
6
|
-
super();
|
|
7
|
-
|
|
8
6
|
this.widgetService = widgetService;
|
|
9
7
|
this.options = deepExtend({}, this.options, options);
|
|
10
8
|
this.offset = { x: 0, y: 0 };
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { Class } from '../../../common';
|
|
2
1
|
import { extend } from '../../utils';
|
|
3
2
|
import {
|
|
4
3
|
toBitsString
|
|
5
4
|
} from '../../utils';
|
|
6
5
|
|
|
7
|
-
export class QRDataMode
|
|
6
|
+
export class QRDataMode {
|
|
8
7
|
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
|
|
11
8
|
this.initProperties();
|
|
12
9
|
}
|
|
13
10
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Class } from '../../../common';
|
|
2
1
|
import { EncodingResult } from '../encoding-result';
|
|
3
2
|
import {
|
|
4
3
|
getModes,
|
|
@@ -7,7 +6,7 @@ import {
|
|
|
7
6
|
getDataString
|
|
8
7
|
} from '../utils/index';
|
|
9
8
|
|
|
10
|
-
export class IsoEncoder
|
|
9
|
+
export class IsoEncoder {
|
|
11
10
|
getEncodingResult(inputString, errorCorrectionLevel) {
|
|
12
11
|
let modes = getModes(inputString),
|
|
13
12
|
dataCodewordsCount = getDataCodewordsCount(modes),
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Class } from '../../../common';
|
|
2
1
|
import { EncodingResult } from '../encoding-result';
|
|
3
2
|
import { DataModeInstances } from '../data-modes/data-mode-instances';
|
|
4
3
|
import { extend } from '../../utils';
|
|
@@ -7,10 +6,8 @@ import { getVersion } from '../utils/index';
|
|
|
7
6
|
|
|
8
7
|
const BYTE = "byte";
|
|
9
8
|
|
|
10
|
-
export class Utf8Encoder
|
|
9
|
+
export class Utf8Encoder {
|
|
11
10
|
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
|
|
14
11
|
this.initProperties();
|
|
15
12
|
|
|
16
13
|
this.mode = DataModeInstances[this.encodingMode];
|
package/dist/es/qrcode/qrcode.js
CHANGED
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
} from '@progress/kendo-drawing';
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
|
-
Class,
|
|
8
7
|
addClass,
|
|
9
8
|
setDefaultOptions,
|
|
10
9
|
deepExtend,
|
|
@@ -31,10 +30,8 @@ const QRCodeDefaults = {
|
|
|
31
30
|
DEFAULT_LOGO_SIZE: 7
|
|
32
31
|
};
|
|
33
32
|
|
|
34
|
-
class QRCode
|
|
33
|
+
class QRCode {
|
|
35
34
|
constructor(element, options, errorHandler = defaultErrorHandler) {
|
|
36
|
-
super();
|
|
37
|
-
|
|
38
35
|
this.options = deepExtend({}, this.options, options);
|
|
39
36
|
this.element = element;
|
|
40
37
|
this.wrapper = this.element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { deepExtend, elementStyles, getTemplate, setDefaultOptions } from '../common';
|
|
2
2
|
import { toDate, toTime } from '../date-utils';
|
|
3
3
|
import FadeOutAnimation from './fade-out-animation';
|
|
4
4
|
|
|
@@ -12,10 +12,8 @@ function createDiv(className, style) {
|
|
|
12
12
|
return div;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
class NavigatorHint
|
|
15
|
+
class NavigatorHint {
|
|
16
16
|
constructor(container, chartService, options) {
|
|
17
|
-
super();
|
|
18
|
-
|
|
19
17
|
this.options = deepExtend({}, this.options, options);
|
|
20
18
|
this.container = container;
|
|
21
19
|
this.chartService = chartService;
|
|
@@ -3,15 +3,13 @@ import { Selection, filterSeriesByType } from '../chart';
|
|
|
3
3
|
import { DRAG, DRAG_END, EQUALLY_SPACED_SERIES, ZOOM, ZOOM_END } from '../chart/constants';
|
|
4
4
|
import { DateCategoryAxis } from '../core';
|
|
5
5
|
import { addDuration, parseDate, toDate, toTime } from '../date-utils';
|
|
6
|
-
import {
|
|
6
|
+
import { deepExtend, defined, getTemplate, InstanceObserver, last, limitValue, valueOrDefault } from '../common';
|
|
7
7
|
import { NAVIGATOR_AXIS, NAVIGATOR_PANE, DEFAULT_PANE } from './constants';
|
|
8
8
|
|
|
9
9
|
const ZOOM_ACCELERATION = 3;
|
|
10
10
|
|
|
11
|
-
class Navigator
|
|
11
|
+
class Navigator {
|
|
12
12
|
constructor(chart) {
|
|
13
|
-
super();
|
|
14
|
-
|
|
15
13
|
this.chart = chart;
|
|
16
14
|
const options = this.options = deepExtend({}, this.options, chart.options.navigator);
|
|
17
15
|
const select = options.select;
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
} from '@progress/kendo-drawing';
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
|
-
Class,
|
|
8
7
|
defined,
|
|
9
8
|
addClass,
|
|
10
9
|
setDefaultOptions,
|
|
@@ -25,10 +24,8 @@ import { surfaceSize } from './surface-size';
|
|
|
25
24
|
const DEFAULT_BARCODE_WIDTH = 300;
|
|
26
25
|
const DEFAULT_BARCODE_HEIGHT = 100;
|
|
27
26
|
|
|
28
|
-
class Barcode
|
|
27
|
+
class Barcode {
|
|
29
28
|
constructor(element, options, errorHandler = defaultErrorHandler) {
|
|
30
|
-
super();
|
|
31
|
-
|
|
32
29
|
this.options = deepExtend({}, this.options, options);
|
|
33
30
|
this.element = element;
|
|
34
31
|
this.onError = errorHandler;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Class } from '../../common';
|
|
2
1
|
import { Encoding } from './encoding';
|
|
3
2
|
import deepExtend from '../../common/deep-extend';
|
|
4
3
|
import inArray from '../../common/in-array';
|
|
@@ -7,9 +6,8 @@ const numberRegex = /^\d+$/;
|
|
|
7
6
|
const alphanumericRegex = /^[a-z0-9]+$/i;
|
|
8
7
|
const extend = Object.assign;
|
|
9
8
|
|
|
10
|
-
export class State128
|
|
9
|
+
export class State128 {
|
|
11
10
|
constructor(encoding) {
|
|
12
|
-
super();
|
|
13
11
|
this.encoding = encoding;
|
|
14
12
|
this.initProperties();
|
|
15
13
|
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Class,
|
|
3
2
|
defined,
|
|
4
3
|
setDefaultOptions
|
|
5
4
|
} from '../../common';
|
|
6
5
|
|
|
7
6
|
const DEFAULT_QUIET_ZONE_LENGTH = 10;
|
|
8
7
|
|
|
9
|
-
export class Encoding
|
|
8
|
+
export class Encoding {
|
|
10
9
|
constructor(options) {
|
|
11
|
-
super();
|
|
12
10
|
this.setOptions(options);
|
|
13
11
|
this.initProperties();
|
|
14
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MIN_VALUE, MAX_VALUE } from '../../common/constants';
|
|
2
|
-
import {
|
|
2
|
+
import { isNumber } from '../../common';
|
|
3
3
|
|
|
4
4
|
import countNumbers from '../utils/count-numbers';
|
|
5
5
|
|
|
@@ -62,7 +62,7 @@ const Aggregates = {
|
|
|
62
62
|
|
|
63
63
|
for (let i = 0; i < length; i++) {
|
|
64
64
|
const value = values[i];
|
|
65
|
-
if (value !== null &&
|
|
65
|
+
if (value !== null && value !== undefined) {
|
|
66
66
|
count++;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -86,7 +86,7 @@ const Aggregates = {
|
|
|
86
86
|
|
|
87
87
|
for (let i = 0; i < length; i++) {
|
|
88
88
|
const value = values[i];
|
|
89
|
-
if (value !== null &&
|
|
89
|
+
if (value !== null && value !== undefined) {
|
|
90
90
|
return value;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import Aggregates from './aggregates';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { inArray, isArray, isFunction, isNumber, isObject } from '../../common';
|
|
4
4
|
|
|
5
|
-
class SeriesAggregator
|
|
5
|
+
class SeriesAggregator {
|
|
6
6
|
constructor(series, binder, defaultAggregates) {
|
|
7
|
-
super();
|
|
8
|
-
|
|
9
7
|
const canonicalFields = binder.canonicalFields(series);
|
|
10
8
|
const valueFields = binder.valueFields(series);
|
|
11
9
|
const sourceFields = binder.sourceFields(series, canonicalFields);
|
|
@@ -42,7 +40,7 @@ class SeriesAggregator extends Class {
|
|
|
42
40
|
const { _series: series, _seriesFields: seriesFields } = this;
|
|
43
41
|
const data = this._bindPoints(srcPoints || []);
|
|
44
42
|
const firstDataItem = data.dataItems[0];
|
|
45
|
-
let result =
|
|
43
|
+
let result = null;
|
|
46
44
|
|
|
47
45
|
if (firstDataItem && !isNumber(firstDataItem) && !isArray(firstDataItem)) {
|
|
48
46
|
const fn = function() {};
|
|
@@ -55,11 +53,15 @@ class SeriesAggregator extends Class {
|
|
|
55
53
|
const srcValues = this._bindField(data.values, field.canonicalName);
|
|
56
54
|
const value = field.transform(srcValues, series, data.dataItems, group);
|
|
57
55
|
|
|
58
|
-
if (value !== null && isObject(value) &&
|
|
56
|
+
if (value !== null && isObject(value) && value.length === undefined && !(value instanceof Date)) {
|
|
59
57
|
result = value;
|
|
60
58
|
break;
|
|
61
59
|
} else {
|
|
62
|
-
if (
|
|
60
|
+
if (value !== undefined) {
|
|
61
|
+
if (result === null) {
|
|
62
|
+
result = {};
|
|
63
|
+
}
|
|
64
|
+
|
|
63
65
|
setValue(field.name, result, value);
|
|
64
66
|
}
|
|
65
67
|
}
|
|
@@ -95,7 +97,7 @@ class SeriesAggregator extends Class {
|
|
|
95
97
|
const valueFields = item.valueFields;
|
|
96
98
|
let value;
|
|
97
99
|
|
|
98
|
-
if (
|
|
100
|
+
if (valueFields[field] !== undefined) {
|
|
99
101
|
value = valueFields[field];
|
|
100
102
|
} else {
|
|
101
103
|
value = item.fields[field];
|
|
@@ -117,7 +119,7 @@ function setValue(fieldName, target, value) {
|
|
|
117
119
|
|
|
118
120
|
while (parts.length > 1) {
|
|
119
121
|
field = parts.shift();
|
|
120
|
-
if (
|
|
122
|
+
if (parentObj[field] === undefined) {
|
|
121
123
|
parentObj[field] = {};
|
|
122
124
|
}
|
|
123
125
|
parentObj = parentObj[field];
|
|
@@ -128,4 +130,4 @@ function setValue(fieldName, target, value) {
|
|
|
128
130
|
parentObj[field] = value;
|
|
129
131
|
}
|
|
130
132
|
|
|
131
|
-
export default SeriesAggregator;
|
|
133
|
+
export default SeriesAggregator;
|
|
@@ -8,7 +8,7 @@ import { evalOptions, categoriesCount } from './utils';
|
|
|
8
8
|
import { ChartElement, Box } from '../core';
|
|
9
9
|
|
|
10
10
|
import { VALUE, STRING, MIN_VALUE, MAX_VALUE, OBJECT } from '../common/constants';
|
|
11
|
-
import { convertableToNumber, deepExtend,
|
|
11
|
+
import { convertableToNumber, deepExtend, isNumber, last, setDefaultOptions, sparseArrayLimits } from '../common';
|
|
12
12
|
|
|
13
13
|
class CategoricalChart extends ChartElement {
|
|
14
14
|
constructor(plotArea, options) {
|
|
@@ -91,7 +91,7 @@ class CategoricalChart extends ChartElement {
|
|
|
91
91
|
const positive = plotValue >= 0;
|
|
92
92
|
let prevValue = startValue;
|
|
93
93
|
let isStackedBar = false;
|
|
94
|
-
const stack =
|
|
94
|
+
const stack = point.series.stack !== undefined ? point.series.stack : this.options.defaultStack;
|
|
95
95
|
const isNonGroupStack = (stack) => stack === true || typeof stack === OBJECT && !stack.group;
|
|
96
96
|
|
|
97
97
|
if (stack) {
|
|
@@ -102,7 +102,7 @@ class CategoricalChart extends ChartElement {
|
|
|
102
102
|
break;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
const otherStack =
|
|
105
|
+
const otherStack = other.series.stack !== undefined ? other.series.stack : this.options.defaultStack;
|
|
106
106
|
|
|
107
107
|
if (!otherStack) {
|
|
108
108
|
continue;
|
|
@@ -166,7 +166,7 @@ class CategoricalChart extends ChartElement {
|
|
|
166
166
|
if (point) {
|
|
167
167
|
if (point.series.stack === stackName || point.series.axis === axisName) {
|
|
168
168
|
const to = this.plotRange(point, 0)[1];
|
|
169
|
-
if (
|
|
169
|
+
if (to !== undefined && isFinite(to)) {
|
|
170
170
|
max = Math.max(max, to);
|
|
171
171
|
min = Math.min(min, to);
|
|
172
172
|
}
|
|
@@ -225,7 +225,7 @@ class CategoricalChart extends ChartElement {
|
|
|
225
225
|
|
|
226
226
|
if (isNumber(lowValue) && isNumber(highValue)) {
|
|
227
227
|
errorRange = { low: lowValue, high: highValue };
|
|
228
|
-
} else if (errorBars &&
|
|
228
|
+
} else if (errorBars && errorBars.value !== undefined) {
|
|
229
229
|
this.seriesErrorRanges = this.seriesErrorRanges || [];
|
|
230
230
|
this.seriesErrorRanges[seriesIx] = this.seriesErrorRanges[seriesIx] ||
|
|
231
231
|
new ErrorRangeCalculator(errorBars.value, series, VALUE);
|
|
@@ -297,7 +297,7 @@ class CategoricalChart extends ChartElement {
|
|
|
297
297
|
|
|
298
298
|
point.owner = this;
|
|
299
299
|
point.noteText = data.fields.noteText;
|
|
300
|
-
if (
|
|
300
|
+
if (point.dataItem === undefined) {
|
|
301
301
|
point.dataItem = series.data[categoryIx];
|
|
302
302
|
}
|
|
303
303
|
this.addErrorBar(point, data, categoryIx);
|
|
@@ -325,7 +325,7 @@ class CategoricalChart extends ChartElement {
|
|
|
325
325
|
};
|
|
326
326
|
|
|
327
327
|
let doEval = this._evalSeries[seriesIx];
|
|
328
|
-
if (
|
|
328
|
+
if (doEval === undefined) {
|
|
329
329
|
this._evalSeries[seriesIx] = doEval = evalOptions(options, {}, state, true);
|
|
330
330
|
}
|
|
331
331
|
|
|
@@ -484,9 +484,9 @@ class CategoricalChart extends ChartElement {
|
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
for (let categoryIx = 0; categoryIx < count; categoryIx++) {
|
|
487
|
+
const currentCategory = this.categoryAxis.categoryAt(categoryIx);
|
|
487
488
|
for (let seriesIx = 0; seriesIx < seriesCount; seriesIx++) {
|
|
488
489
|
const currentSeries = series[seriesIx];
|
|
489
|
-
const currentCategory = this.categoryAxis.categoryAt(categoryIx);
|
|
490
490
|
const pointData = this.plotArea.bindPoint(currentSeries, categoryIx);
|
|
491
491
|
|
|
492
492
|
callback(pointData, {
|
|
@@ -21,7 +21,7 @@ import { ChartPane, ChartPlotArea, findAxisByName } from './api-elements';
|
|
|
21
21
|
import { X, Y, VALUE, DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_SERIES_OPACITY,
|
|
22
22
|
ARROW_DOWN, ARROW_UP, ARROW_LEFT, ARROW_RIGHT, ARIA_ACTIVE_DESCENDANT, TAB, TOP, LEFT, BLACK,
|
|
23
23
|
ENTER, ESCAPE, BOTTOM } from '../common/constants';
|
|
24
|
-
import { addClass, removeClass,
|
|
24
|
+
import { addClass, removeClass, setDefaultOptions, deepExtend, defined, find, isObject, isFunction, elementSize, elementOffset,
|
|
25
25
|
elementScale, elementStyles, eventCoordinates, bindEvents, unbindEvents, mousewheelDelta, FontLoader, inArray, round,
|
|
26
26
|
valueOrDefault, isString, cycleUp, cycleDown, hasOwnProperty, hasClasses } from '../common';
|
|
27
27
|
|
|
@@ -45,10 +45,8 @@ const BLUR = "blur";
|
|
|
45
45
|
const MOUSEMOVE_DELAY = 20;
|
|
46
46
|
const NO_DATA_OVERLAY_TOP_CLASS = "k-chart-overlay-top";
|
|
47
47
|
|
|
48
|
-
class Chart
|
|
48
|
+
class Chart {
|
|
49
49
|
constructor(element, userOptions, themeOptions, context = {}) {
|
|
50
|
-
super();
|
|
51
|
-
|
|
52
50
|
this.observers = [];
|
|
53
51
|
this.addObserver(context.observer);
|
|
54
52
|
this.chartService = new ChartService(this, context);
|
|
@@ -346,9 +344,12 @@ class Chart extends Class {
|
|
|
346
344
|
|
|
347
345
|
model.renderVisual();
|
|
348
346
|
|
|
349
|
-
|
|
347
|
+
const transitions = this.options.transitions;
|
|
348
|
+
if (transitions !== false) {
|
|
350
349
|
model.traverse(function(element) {
|
|
351
350
|
if (element.animation) {
|
|
351
|
+
const loading = (transitions && transitions !== true) ? transitions.loading : transitions;
|
|
352
|
+
element.animation.options = Object.assign({}, element.animation.options, loading);
|
|
352
353
|
element.animation.setup();
|
|
353
354
|
}
|
|
354
355
|
});
|
|
@@ -357,7 +358,7 @@ class Chart extends Class {
|
|
|
357
358
|
this._initSurface();
|
|
358
359
|
this.surface.draw(model.visual);
|
|
359
360
|
|
|
360
|
-
if (
|
|
361
|
+
if (transitions !== false) {
|
|
361
362
|
model.traverse(function(element) {
|
|
362
363
|
if (element.animation) {
|
|
363
364
|
element.animation.play();
|
|
@@ -1926,14 +1927,14 @@ class Chart extends Class {
|
|
|
1926
1927
|
let transitionsState;
|
|
1927
1928
|
|
|
1928
1929
|
if (options.transitions !== false) {
|
|
1930
|
+
transitionsState = options.transitions;
|
|
1929
1931
|
options.transitions = false;
|
|
1930
|
-
transitionsState = true;
|
|
1931
1932
|
}
|
|
1932
1933
|
|
|
1933
1934
|
this._redraw();
|
|
1934
1935
|
|
|
1935
1936
|
if (transitionsState) {
|
|
1936
|
-
options.transitions =
|
|
1937
|
+
options.transitions = transitionsState;
|
|
1937
1938
|
}
|
|
1938
1939
|
}
|
|
1939
1940
|
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import SeriesBinder from '../series-binder';
|
|
2
2
|
|
|
3
3
|
import { OBJECT } from '../../common/constants';
|
|
4
|
-
import {
|
|
4
|
+
import { defined, getter, isArray, isNumber } from '../../common';
|
|
5
5
|
|
|
6
6
|
const STD_ERR = "stderr";
|
|
7
7
|
const STD_DEV = "stddev";
|
|
8
8
|
const percentRegex = /percent(?:\w*)\((\d+)\)/;
|
|
9
9
|
const standardDeviationRegex = new RegExp("^" + STD_DEV + "(?:\\((\\d+(?:\\.\\d+)?)\\))?$");
|
|
10
10
|
|
|
11
|
-
class ErrorRangeCalculator
|
|
11
|
+
class ErrorRangeCalculator {
|
|
12
12
|
constructor(errorValue, series, field) {
|
|
13
|
-
super();
|
|
14
|
-
|
|
15
13
|
this.initGlobalRanges(errorValue, series, field);
|
|
16
14
|
}
|
|
17
15
|
|
|
@@ -8,7 +8,7 @@ import ClipAnimationMixin from '../mixins/clip-animation-mixin';
|
|
|
8
8
|
|
|
9
9
|
import { ZERO, SMOOTH, STEP } from '../constants';
|
|
10
10
|
|
|
11
|
-
import { deepExtend,
|
|
11
|
+
import { deepExtend, isFunction } from '../../common';
|
|
12
12
|
|
|
13
13
|
class LineChart extends CategoricalChart {
|
|
14
14
|
render() {
|
|
@@ -28,7 +28,7 @@ class LineChart extends CategoricalChart {
|
|
|
28
28
|
const missingValues = this.seriesMissingValues(series);
|
|
29
29
|
let value = data.valueFields.value;
|
|
30
30
|
|
|
31
|
-
if (
|
|
31
|
+
if (value === undefined || value === null) {
|
|
32
32
|
if (missingValues === ZERO) {
|
|
33
33
|
value = 0;
|
|
34
34
|
} else {
|