@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
|
@@ -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);
|
|
@@ -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 {
|
|
@@ -7,19 +7,22 @@ import NoteMixin from '../mixins/note-mixin';
|
|
|
7
7
|
import { LINE_MARKER_SIZE, FADEIN, INITIAL_ANIMATION_DURATION, BORDER_BRIGHTNESS, TOOLTIP_OFFSET, ABOVE, BELOW, CHART_POINT_ROLE, CHART_POINT_CLASSNAME, CHART_POINT_ROLE_DESCRIPTION } from '../constants';
|
|
8
8
|
|
|
9
9
|
import { WHITE, CIRCLE, CENTER, TOP, BOTTOM, LEFT, HIGHLIGHT_ZINDEX } from '../../common/constants';
|
|
10
|
-
import { deepExtend,
|
|
11
|
-
import
|
|
10
|
+
import { deepExtend, getTemplate, getAriaTemplate, valueOrDefault, getSpacing } from '../../common';
|
|
11
|
+
import elementId from '../../core/utils/element-id';
|
|
12
12
|
import unclipBox from '../utils/unclip-box';
|
|
13
13
|
|
|
14
14
|
class LinePoint extends ChartElement {
|
|
15
15
|
constructor(value, options) {
|
|
16
|
-
super();
|
|
16
|
+
super(options);
|
|
17
17
|
|
|
18
18
|
this.value = value;
|
|
19
|
-
this.options = Object.assign({}, options);
|
|
20
19
|
this.aboveAxis = valueOrDefault(this.options.aboveAxis, true);
|
|
21
20
|
this.tooltipTracking = true;
|
|
22
|
-
this._id =
|
|
21
|
+
this._id = elementId();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
initOptions(options) {
|
|
25
|
+
this.options = Object.assign({}, options);
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
render() {
|
|
@@ -56,15 +59,13 @@ class LinePoint extends ChartElement {
|
|
|
56
59
|
|
|
57
60
|
createLabelElement(options) {
|
|
58
61
|
return new TextBox(this.getLabelText(options),
|
|
59
|
-
|
|
60
|
-
align: CENTER,
|
|
62
|
+
Object.assign({}, {align: CENTER,
|
|
61
63
|
vAlign: CENTER,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}, options),
|
|
64
|
+
zIndex: valueOrDefault(options.zIndex, this.series.zIndex)},
|
|
65
|
+
options,
|
|
66
|
+
{margin: Object.assign({}, {left: 5,
|
|
67
|
+
right: 5},
|
|
68
|
+
options.margin)}),
|
|
68
69
|
this.pointData()
|
|
69
70
|
);
|
|
70
71
|
}
|
|
@@ -95,9 +96,9 @@ class LinePoint extends ChartElement {
|
|
|
95
96
|
markerBorder() {
|
|
96
97
|
const options = this.options.markers;
|
|
97
98
|
const background = options.background;
|
|
98
|
-
const border =
|
|
99
|
+
const border = Object.assign({}, {color: this.color}, options.border);
|
|
99
100
|
|
|
100
|
-
if (
|
|
101
|
+
if (border.color === undefined) {
|
|
101
102
|
border.color = new Color(background).brightness(BORDER_BRIGHTNESS).toHex();
|
|
102
103
|
}
|
|
103
104
|
|
|
@@ -120,9 +121,8 @@ class LinePoint extends ChartElement {
|
|
|
120
121
|
zIndex: valueOrDefault(options.zIndex, this.series.zIndex),
|
|
121
122
|
animation: options.animation,
|
|
122
123
|
visual: options.visual,
|
|
123
|
-
accessibilityOptions:
|
|
124
|
-
|
|
125
|
-
}, this.options.accessibility)
|
|
124
|
+
accessibilityOptions: Object.assign({}, {ariaLabel: this.getAriaLabelText(this.options.labels)},
|
|
125
|
+
this.options.accessibility)
|
|
126
126
|
}, {
|
|
127
127
|
dataItem: this.dataItem,
|
|
128
128
|
value: this.value,
|
|
@@ -370,7 +370,7 @@ class LinePoint extends ChartElement {
|
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
getIndex() {
|
|
373
|
-
return
|
|
373
|
+
return this.categoryIx !== undefined ? this.categoryIx : this.pointIx;
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import addAccessibilityAttributesToVisual from "../../core/utils/add-accessibility-attributes-to-visual";
|
|
2
|
-
import {
|
|
2
|
+
import { getAriaTemplate } from "../../common";
|
|
3
3
|
import guid from '../../core/utils/guid';
|
|
4
4
|
|
|
5
5
|
const AccessibilityAttributesMixin = {
|
|
6
6
|
addAccessibilityAttributesToVisual: function() {
|
|
7
7
|
this._id = this._id || guid();
|
|
8
8
|
|
|
9
|
-
const accessibilityOptions =
|
|
10
|
-
|
|
11
|
-
}, this.options.accessibility);
|
|
9
|
+
const accessibilityOptions = Object.assign({}, {ariaLabel: this.getAriaLabelText()},
|
|
10
|
+
this.options.accessibility);
|
|
12
11
|
|
|
13
12
|
addAccessibilityAttributesToVisual(this.visual, accessibilityOptions);
|
|
14
13
|
},
|
|
@@ -2,7 +2,6 @@ import { ZERO, INTERPOLATE } from '../constants';
|
|
|
2
2
|
|
|
3
3
|
import { Point } from '../../core';
|
|
4
4
|
import { MAX_VALUE } from '../../common/constants';
|
|
5
|
-
import { defined } from '../../common';
|
|
6
5
|
|
|
7
6
|
const LineChartMixin = {
|
|
8
7
|
renderSegments: function() {
|
|
@@ -70,7 +69,7 @@ const LineChartMixin = {
|
|
|
70
69
|
for (let i = 0; i < allPoints.length; i++) {
|
|
71
70
|
const point = allPoints[i];
|
|
72
71
|
|
|
73
|
-
if (point &&
|
|
72
|
+
if (point && point.value !== undefined && point.value !== null && point.visible !== false) {
|
|
74
73
|
const pointBox = point.box;
|
|
75
74
|
const pointDistance = pointBox.center().distanceTo(target);
|
|
76
75
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Note } from '../../core';
|
|
2
|
-
import { defined } from '../../common';
|
|
3
2
|
|
|
4
3
|
const NoteMixin = {
|
|
5
4
|
createNote: function() {
|
|
6
5
|
const options = this.options.notes;
|
|
7
6
|
const text = this.noteText || options.label.text;
|
|
8
7
|
|
|
9
|
-
if (options.visible !== false &&
|
|
8
|
+
if (options.visible !== false && text !== undefined && text !== null) {
|
|
10
9
|
this.note = new Note({
|
|
11
10
|
value: this.value,
|
|
12
11
|
text: text,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import toChartAxisRanges from './to-chart-axis-ranges';
|
|
3
3
|
|
|
4
4
|
import { X, Y } from '../../common/constants';
|
|
5
|
-
import {
|
|
5
|
+
import { deepExtend } from '../../common';
|
|
6
6
|
import { limitValue } from '../../drawing-utils';
|
|
7
7
|
|
|
8
8
|
// Limit the zoom rate between 1% and 90% per mousewheel event.
|
|
@@ -11,10 +11,8 @@ const MIN_RATE = 0.01;
|
|
|
11
11
|
const MAX_RATE = 0.9;
|
|
12
12
|
const DEFAULT_RATE = 0.3;
|
|
13
13
|
|
|
14
|
-
class MousewheelZoom
|
|
14
|
+
class MousewheelZoom {
|
|
15
15
|
constructor(chart, options) {
|
|
16
|
-
super();
|
|
17
|
-
|
|
18
16
|
this.chart = chart;
|
|
19
17
|
this.options = deepExtend({
|
|
20
18
|
rate: DEFAULT_RATE
|
|
@@ -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 } from '../../common';
|
|
6
6
|
|
|
7
|
-
class Pannable
|
|
7
|
+
class Pannable {
|
|
8
8
|
constructor(plotArea, options) {
|
|
9
|
-
super();
|
|
10
|
-
|
|
11
9
|
this.plotArea = plotArea;
|
|
12
10
|
this.options = deepExtend({}, this.options, options);
|
|
13
11
|
}
|