@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.
Files changed (133) hide show
  1. package/dist/cdn/js/kendo-charts.js +1 -1
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/barcode/barcode.js +1 -4
  4. package/dist/es/barcode/encodings/code128.js +1 -3
  5. package/dist/es/barcode/encodings/encoding.js +1 -3
  6. package/dist/es/chart/aggregates/aggregates.js +3 -3
  7. package/dist/es/chart/aggregates/default-aggregates.js +1 -5
  8. package/dist/es/chart/aggregates/series-aggregator.js +12 -10
  9. package/dist/es/chart/api-elements/chart-axis.js +1 -5
  10. package/dist/es/chart/api-elements/chart-plotarea.js +1 -5
  11. package/dist/es/chart/axis-group-range-tracker.js +1 -4
  12. package/dist/es/chart/categorical-chart.js +8 -8
  13. package/dist/es/chart/chart.js +2 -4
  14. package/dist/es/chart/error-bars/error-range-calculator.js +2 -4
  15. package/dist/es/chart/highlight.js +1 -5
  16. package/dist/es/chart/line-chart/line-chart.js +2 -2
  17. package/dist/es/chart/line-chart/line-point.js +19 -19
  18. package/dist/es/chart/mixins/accessibility-attributes-mixin.js +3 -4
  19. package/dist/es/chart/mixins/line-chart-mixin.js +1 -2
  20. package/dist/es/chart/mixins/note-mixin.js +1 -2
  21. package/dist/es/chart/pan-and-zoom/mousewheel-zoom.js +2 -4
  22. package/dist/es/chart/pan-and-zoom/pannable.js +2 -4
  23. package/dist/es/chart/pan-and-zoom/zoom-selection.js +2 -4
  24. package/dist/es/chart/plotarea/categorical-plotarea.js +2 -2
  25. package/dist/es/chart/plotarea/plotarea-factory.js +1 -5
  26. package/dist/es/chart/selection.js +2 -4
  27. package/dist/es/chart/series-binder.js +4 -8
  28. package/dist/es/chart/tooltip/base-tooltip.js +2 -4
  29. package/dist/es/common/getter.js +1 -3
  30. package/dist/es/common/grep.js +2 -11
  31. package/dist/es/common/in-array.js +1 -1
  32. package/dist/es/common/observable.js +1 -4
  33. package/dist/es/common/user-events.js +2 -6
  34. package/dist/es/core/box.js +38 -20
  35. package/dist/es/core/category-axis.js +5 -12
  36. package/dist/es/core/chart-element.js +8 -6
  37. package/dist/es/core/curve-processor.js +2 -5
  38. package/dist/es/core/point.js +2 -4
  39. package/dist/es/core/ring.js +2 -5
  40. package/dist/es/core/shape-builder.js +1 -2
  41. package/dist/es/core/utils/element-id.js +5 -0
  42. package/dist/es/core/utils/guid.js +4 -16
  43. package/dist/es/drawing-utils.js +0 -2
  44. package/dist/es/gauges/gauge.js +2 -5
  45. package/dist/es/gauges/pointer.js +2 -4
  46. package/dist/es/map/crs.js +5 -10
  47. package/dist/es/map/extent.js +1 -3
  48. package/dist/es/map/layers/bubble.js +1 -4
  49. package/dist/es/map/layers/layer.js +1 -4
  50. package/dist/es/map/layers/marker.js +1 -3
  51. package/dist/es/map/layers/shape.js +1 -3
  52. package/dist/es/map/layers/tile.js +3 -7
  53. package/dist/es/map/location.js +1 -4
  54. package/dist/es/map/scroller/draggable.js +1 -4
  55. package/dist/es/map/scroller/fx.js +1 -3
  56. package/dist/es/map/scroller/scroller.js +1 -4
  57. package/dist/es/map/tooltip/tooltip.js +2 -4
  58. package/dist/es/qrcode/encodings/data-modes/qr-data-mode.js +1 -4
  59. package/dist/es/qrcode/encodings/encoders/iso-encoder.js +1 -2
  60. package/dist/es/qrcode/encodings/encoders/utf8-encoder.js +1 -4
  61. package/dist/es/qrcode/encodings/encoding-result.js +1 -5
  62. package/dist/es/qrcode/encodings/free-cell-visitor.js +1 -5
  63. package/dist/es/qrcode/qrcode.js +1 -4
  64. package/dist/es/sankey/element.js +1 -3
  65. package/dist/es/stock/navigator-hint.js +2 -4
  66. package/dist/es/stock/navigator.js +2 -4
  67. package/dist/es2015/barcode/barcode.js +1 -4
  68. package/dist/es2015/barcode/encodings/code128.js +1 -3
  69. package/dist/es2015/barcode/encodings/encoding.js +1 -3
  70. package/dist/es2015/chart/aggregates/aggregates.js +3 -3
  71. package/dist/es2015/chart/aggregates/default-aggregates.js +1 -5
  72. package/dist/es2015/chart/aggregates/series-aggregator.js +12 -10
  73. package/dist/es2015/chart/api-elements/chart-axis.js +1 -5
  74. package/dist/es2015/chart/api-elements/chart-plotarea.js +1 -5
  75. package/dist/es2015/chart/axis-group-range-tracker.js +1 -4
  76. package/dist/es2015/chart/categorical-chart.js +8 -8
  77. package/dist/es2015/chart/chart.js +2 -4
  78. package/dist/es2015/chart/error-bars/error-range-calculator.js +2 -4
  79. package/dist/es2015/chart/highlight.js +1 -5
  80. package/dist/es2015/chart/line-chart/line-chart.js +2 -2
  81. package/dist/es2015/chart/line-chart/line-point.js +19 -19
  82. package/dist/es2015/chart/mixins/accessibility-attributes-mixin.js +3 -4
  83. package/dist/es2015/chart/mixins/line-chart-mixin.js +1 -2
  84. package/dist/es2015/chart/mixins/note-mixin.js +1 -2
  85. package/dist/es2015/chart/pan-and-zoom/mousewheel-zoom.js +2 -4
  86. package/dist/es2015/chart/pan-and-zoom/pannable.js +2 -4
  87. package/dist/es2015/chart/pan-and-zoom/zoom-selection.js +2 -4
  88. package/dist/es2015/chart/plotarea/categorical-plotarea.js +2 -2
  89. package/dist/es2015/chart/plotarea/plotarea-factory.js +1 -5
  90. package/dist/es2015/chart/selection.js +2 -4
  91. package/dist/es2015/chart/series-binder.js +4 -8
  92. package/dist/es2015/chart/tooltip/base-tooltip.js +2 -4
  93. package/dist/es2015/common/getter.js +1 -3
  94. package/dist/es2015/common/grep.js +2 -11
  95. package/dist/es2015/common/in-array.js +1 -1
  96. package/dist/es2015/common/observable.js +1 -4
  97. package/dist/es2015/common/user-events.js +2 -6
  98. package/dist/es2015/core/box.js +38 -20
  99. package/dist/es2015/core/category-axis.js +5 -12
  100. package/dist/es2015/core/chart-element.js +8 -6
  101. package/dist/es2015/core/curve-processor.js +2 -5
  102. package/dist/es2015/core/point.js +2 -4
  103. package/dist/es2015/core/ring.js +2 -5
  104. package/dist/es2015/core/shape-builder.js +1 -2
  105. package/dist/es2015/core/utils/element-id.js +5 -0
  106. package/dist/es2015/core/utils/guid.js +4 -16
  107. package/dist/es2015/drawing-utils.js +0 -2
  108. package/dist/es2015/gauges/gauge.js +2 -5
  109. package/dist/es2015/gauges/pointer.js +2 -4
  110. package/dist/es2015/map/crs.js +5 -10
  111. package/dist/es2015/map/extent.js +1 -3
  112. package/dist/es2015/map/layers/bubble.js +1 -4
  113. package/dist/es2015/map/layers/layer.js +1 -4
  114. package/dist/es2015/map/layers/marker.js +1 -3
  115. package/dist/es2015/map/layers/shape.js +1 -3
  116. package/dist/es2015/map/layers/tile.js +3 -7
  117. package/dist/es2015/map/location.js +1 -4
  118. package/dist/es2015/map/scroller/draggable.js +1 -4
  119. package/dist/es2015/map/scroller/fx.js +1 -3
  120. package/dist/es2015/map/scroller/scroller.js +1 -4
  121. package/dist/es2015/map/tooltip/tooltip.js +2 -4
  122. package/dist/es2015/qrcode/encodings/data-modes/qr-data-mode.js +1 -4
  123. package/dist/es2015/qrcode/encodings/encoders/iso-encoder.js +1 -2
  124. package/dist/es2015/qrcode/encodings/encoders/utf8-encoder.js +1 -4
  125. package/dist/es2015/qrcode/encodings/encoding-result.js +1 -5
  126. package/dist/es2015/qrcode/encodings/free-cell-visitor.js +1 -5
  127. package/dist/es2015/qrcode/qrcode.js +1 -4
  128. package/dist/es2015/sankey/element.js +1 -3
  129. package/dist/es2015/stock/navigator-hint.js +2 -4
  130. package/dist/es2015/stock/navigator.js +2 -4
  131. package/dist/npm/main.js +6372 -6890
  132. package/dist/systemjs/kendo-charts.js +1 -1
  133. 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 extends Class {
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 extends Class {
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 extends Class {
9
+ export class Utf8Encoder {
11
10
  constructor() {
12
- super();
13
-
14
11
  this.initProperties();
15
12
 
16
13
  this.mode = DataModeInstances[this.encodingMode];
@@ -1,9 +1,5 @@
1
- import { Class } from '../../common';
2
-
3
- export class EncodingResult extends Class {
1
+ export class EncodingResult {
4
2
  constructor(dataString, version) {
5
- super();
6
-
7
3
  this.dataString = dataString;
8
4
  this.version = version;
9
5
  }
@@ -1,9 +1,5 @@
1
- import { Class } from '../../common';
2
-
3
- export class FreeCellVisitor extends Class {
1
+ export class FreeCellVisitor {
4
2
  constructor(matrix) {
5
- super();
6
-
7
3
  this.matrix = matrix;
8
4
  this.row = matrix.length - 1;
9
5
  this.column = matrix.length - 1;
@@ -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 extends Class {
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,11 +1,9 @@
1
1
  import {
2
- Class,
3
2
  deepExtend
4
3
  } from '../common';
5
4
 
6
- export class SankeyElement extends Class {
5
+ export class SankeyElement {
7
6
  constructor(options) {
8
- super();
9
7
  this.options = deepExtend({}, this.options, options);
10
8
  this.createVisual();
11
9
  }
@@ -1,4 +1,4 @@
1
- import { Class, deepExtend, elementStyles, getTemplate, setDefaultOptions } from '../common';
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 extends Class {
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 { Class, deepExtend, defined, getTemplate, InstanceObserver, last, limitValue, valueOrDefault } from '../common';
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 extends Class {
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 extends Class {
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 extends Class {
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 extends Class {
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 { defined, isNumber } from '../../common';
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 && defined(value)) {
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 && defined(value)) {
89
+ if (value !== null && value !== undefined) {
90
90
  return value;
91
91
  }
92
92
  }
@@ -1,9 +1,5 @@
1
- import { Class } from '../../common';
2
-
3
- class DefaultAggregates extends Class {
1
+ class DefaultAggregates {
4
2
  constructor() {
5
- super();
6
-
7
3
  this._defaults = {};
8
4
  }
9
5
 
@@ -1,11 +1,9 @@
1
1
  import Aggregates from './aggregates';
2
2
 
3
- import { Class, defined, inArray, isArray, isFunction, isNumber, isObject } from '../../common';
3
+ import { inArray, isArray, isFunction, isNumber, isObject } from '../../common';
4
4
 
5
- class SeriesAggregator extends Class {
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) && !defined(value.length) && !(value instanceof Date)) {
56
+ if (value !== null && isObject(value) && value.length === undefined && !(value instanceof Date)) {
59
57
  result = value;
60
58
  break;
61
59
  } else {
62
- if (defined(value)) {
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 (defined(valueFields[field])) {
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 (!defined(parentObj[field])) {
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;
@@ -1,9 +1,5 @@
1
- import { Class } from '../../common';
2
-
3
- class ChartAxis extends Class {
1
+ class ChartAxis {
4
2
  constructor(axis) {
5
- super();
6
-
7
3
  this._axis = axis;
8
4
  this.options = axis.options;
9
5
  }
@@ -1,9 +1,5 @@
1
- import { Class } from '../../common';
2
-
3
- class ChartPlotArea extends Class {
1
+ class ChartPlotArea {
4
2
  constructor(plotArea) {
5
- super();
6
-
7
3
  this._plotArea = plotArea;
8
4
  this.visual = plotArea.visual;
9
5
  this.backgroundVisual = plotArea._bgVisual;
@@ -1,10 +1,7 @@
1
1
  import { MIN_VALUE, MAX_VALUE } from '../common/constants';
2
- import { Class } from '../common';
3
2
 
4
- class AxisGroupRangeTracker extends Class {
3
+ class AxisGroupRangeTracker {
5
4
  constructor() {
6
- super();
7
-
8
5
  this.axisRanges = {};
9
6
  }
10
7
 
@@ -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, defined, isNumber, last, setDefaultOptions, sparseArrayLimits } from '../common';
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 = defined(point.series.stack) ? point.series.stack : this.options.defaultStack;
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 = defined(other.series.stack) ? other.series.stack : this.options.defaultStack;
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 (defined(to) && isFinite(to)) {
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 && defined(errorBars.value)) {
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 (!defined(point.dataItem)) {
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 (!defined(doEval)) {
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, Class, setDefaultOptions, deepExtend, defined, find, isObject, isFunction, elementSize, elementOffset,
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 extends Class {
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 { Class, defined, getter, isArray, isNumber } from '../../common';
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 extends Class {
11
+ class ErrorRangeCalculator {
12
12
  constructor(errorValue, series, field) {
13
- super();
14
-
15
13
  this.initGlobalRanges(errorValue, series, field);
16
14
  }
17
15
 
@@ -1,9 +1,5 @@
1
- import { Class } from '../common';
2
-
3
- class Highlight extends Class {
1
+ class Highlight {
4
2
  constructor() {
5
- super();
6
-
7
3
  this._points = [];
8
4
  }
9
5
 
@@ -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, defined, isFunction } from '../../common';
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 (!defined(value) || value === null) {
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, defined, getTemplate, getAriaTemplate, valueOrDefault, getSpacing } from '../../common';
11
- import guid from '../../core/utils/guid';
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 = guid();
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
- deepExtend({
60
- align: CENTER,
62
+ Object.assign({}, {align: CENTER,
61
63
  vAlign: CENTER,
62
- margin: {
63
- left: 5,
64
- right: 5
65
- },
66
- zIndex: valueOrDefault(options.zIndex, this.series.zIndex)
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 = deepExtend({ color: this.color }, options.border);
99
+ const border = Object.assign({}, {color: this.color}, options.border);
99
100
 
100
- if (!defined(border.color)) {
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: deepExtend({
124
- ariaLabel: this.getAriaLabelText(this.options.labels)
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 defined(this.categoryIx) ? this.categoryIx : this.pointIx;
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 { deepExtend, getAriaTemplate } from "../../common";
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 = deepExtend({
10
- ariaLabel: this.getAriaLabelText()
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 && defined(point.value) && point.value !== null && point.visible !== false) {
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 && defined(text) && text !== null) {
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 { Class, deepExtend } from '../../common';
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 extends Class {
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 { Class, deepExtend } from '../../common';
5
+ import { deepExtend } from '../../common';
6
6
 
7
- class Pannable extends Class {
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
  }