@progress/kendo-charts 2.13.0-develop.1 → 2.13.0-develop.3

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 (54) hide show
  1. package/dist/cdn/js/kendo-charts.js +1 -1
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/chart/plotarea/categorical-plotarea.js +9 -6
  4. package/dist/es2015/chart/plotarea/categorical-plotarea.js +9 -6
  5. package/dist/npm/api-types/axis-range.interface.d.ts +3 -3
  6. package/dist/npm/api-types/chart-axis.interface.d.ts +10 -11
  7. package/dist/npm/api-types/chart-pane.interface.d.ts +10 -1
  8. package/dist/npm/api-types/chart-plotarea.interface.d.ts +1 -1
  9. package/dist/npm/api-types/chart-svg-export-options.interface.d.ts +16 -0
  10. package/dist/npm/api-types/chart-visual-export-options.interface.d.ts +14 -0
  11. package/dist/npm/api-types/event-axis-options.interface.d.ts +1 -1
  12. package/dist/npm/api-types/series-point-marker.interface.d.ts +16 -0
  13. package/dist/npm/api-types/series-point.interface.d.ts +32 -11
  14. package/dist/npm/api-types.d.ts +4 -0
  15. package/dist/npm/field-types/line-style.d.ts +1 -6
  16. package/dist/npm/field-types/series-labels-alignment.d.ts +1 -1
  17. package/dist/npm/main.js +11 -6
  18. package/dist/npm/option-types/axis-crosshair-tooltip.interface.d.ts +6 -0
  19. package/dist/npm/option-types/axis-defaults/crosshair.interface.d.ts +1 -1
  20. package/dist/npm/option-types/axis-defaults/labels.interface.d.ts +13 -2
  21. package/dist/npm/option-types/axis-defaults/title.interface.d.ts +3 -0
  22. package/dist/npm/option-types/category-axis-item/crosshair.interface.d.ts +1 -1
  23. package/dist/npm/option-types/category-axis-item/highlight.interface.d.ts +28 -0
  24. package/dist/npm/option-types/category-axis-item/labels.interface.d.ts +29 -7
  25. package/dist/npm/option-types/category-axis-item/notes.label.interface.d.ts +10 -1
  26. package/dist/npm/option-types/category-axis-item.interface.d.ts +10 -1
  27. package/dist/npm/option-types/navigator/hint.interface.d.ts +1 -1
  28. package/dist/npm/option-types/navigator.interface.d.ts +2 -2
  29. package/dist/npm/option-types/pane/title.interface.d.ts +1 -1
  30. package/dist/npm/option-types/series-defaults/labels.from.interface.d.ts +10 -1
  31. package/dist/npm/option-types/series-defaults/labels.interface.d.ts +12 -3
  32. package/dist/npm/option-types/series-defaults/labels.to.interface.d.ts +6 -0
  33. package/dist/npm/option-types/series-defaults/notes.label.interface.d.ts +6 -0
  34. package/dist/npm/option-types/series-defaults/tooltip.interface.d.ts +10 -1
  35. package/dist/npm/option-types/series-item/error-bars.interface.d.ts +3 -3
  36. package/dist/npm/option-types/series-item/highlight.interface.d.ts +5 -5
  37. package/dist/npm/option-types/series-item/labels.from.interface.d.ts +9 -1
  38. package/dist/npm/option-types/series-item/labels.interface.d.ts +16 -7
  39. package/dist/npm/option-types/series-item/labels.to.interface.d.ts +10 -1
  40. package/dist/npm/option-types/series-item/notes.label.interface.d.ts +9 -1
  41. package/dist/npm/option-types/series-item/tooltip.interface.d.ts +9 -1
  42. package/dist/npm/option-types/tooltip.interface.d.ts +6 -0
  43. package/dist/npm/option-types/value-axis-item/crosshair.interface.d.ts +1 -1
  44. package/dist/npm/option-types/value-axis-item/labels.interface.d.ts +10 -1
  45. package/dist/npm/option-types/value-axis-item/notes.label.interface.d.ts +6 -0
  46. package/dist/npm/option-types/x-axis-item/crosshair.interface.d.ts +1 -1
  47. package/dist/npm/option-types/x-axis-item/labels.interface.d.ts +28 -6
  48. package/dist/npm/option-types/x-axis-item/notes.label.interface.d.ts +10 -1
  49. package/dist/npm/option-types/y-axis-item/crosshair.interface.d.ts +1 -1
  50. package/dist/npm/option-types/y-axis-item/labels.interface.d.ts +28 -6
  51. package/dist/npm/option-types/y-axis-item/notes.label.interface.d.ts +10 -1
  52. package/dist/npm/property-types.d.ts +3 -2
  53. package/dist/systemjs/kendo-charts.js +1 -1
  54. package/package.json +2 -2
@@ -131,7 +131,8 @@ class CategoricalPlotArea extends PlotAreaBase {
131
131
  this._seriesPointsCache = {};
132
132
  this._currentPointsCache = {};
133
133
  categoryAxis.options.dataItems = [];
134
- series = this.aggregateSeries(series, categoryAxis, categoryAxis.totalRangeIndices());
134
+
135
+ series = this.aggregateSeries(series, categoryAxis);
135
136
  }
136
137
 
137
138
  const min = range ? range.min : 0;
@@ -304,7 +305,7 @@ class CategoricalPlotArea extends PlotAreaBase {
304
305
  return result;
305
306
  }
306
307
 
307
- aggregateSeries(series, categoryAxis, range) {
308
+ aggregateSeries(series, categoryAxis, range = null) {
308
309
  const srcData = series.data;
309
310
  if (!srcData.length) {
310
311
  return series;
@@ -314,11 +315,13 @@ class CategoricalPlotArea extends PlotAreaBase {
314
315
  const result = deepExtend({}, series);
315
316
  const aggregator = new SeriesAggregator(deepExtend({}, series), SeriesBinder.current, DefaultAggregates.current);
316
317
  const data = result.data = [];
317
-
318
318
  const dataItems = categoryAxis.options.dataItems || [];
319
319
 
320
+ // Use full range if not provided, otherwise use current range to aggregate only visible categories
321
+ const aggregateRange = range || { min: 0, max: srcPoints.length - 1 };
322
+
320
323
  const categoryItem = (idx) => {
321
- const categoryIdx = idx - range.min;
324
+ const categoryIdx = idx - aggregateRange.min;
322
325
  let point = srcPoints[idx];
323
326
  if (!point) {
324
327
  point = srcPoints[idx] = {};
@@ -335,7 +338,7 @@ class CategoricalPlotArea extends PlotAreaBase {
335
338
  return point;
336
339
  };
337
340
 
338
- for (let idx = range.min; idx <= range.max; idx++) {
341
+ for (let idx = aggregateRange.min; idx <= aggregateRange.max; idx++) {
339
342
  const point = categoryItem(idx);
340
343
  data[point.categoryIx] = point.item;
341
344
 
@@ -345,7 +348,7 @@ class CategoricalPlotArea extends PlotAreaBase {
345
348
  }
346
349
 
347
350
  if (inArray(result.type, OUT_OF_RANGE_SERIES)) {
348
- createOutOfRangePoints(result, range, categoryAxis.totalCount(), categoryItem, (idx) => srcPoints[idx]);
351
+ createOutOfRangePoints(result, aggregateRange, categoryAxis.totalCount(), categoryItem, (idx) => srcPoints[idx]);
349
352
  }
350
353
 
351
354
  categoryAxis.options.dataItems = dataItems;
@@ -131,7 +131,8 @@ class CategoricalPlotArea extends PlotAreaBase {
131
131
  this._seriesPointsCache = {};
132
132
  this._currentPointsCache = {};
133
133
  categoryAxis.options.dataItems = [];
134
- series = this.aggregateSeries(series, categoryAxis, categoryAxis.totalRangeIndices());
134
+
135
+ series = this.aggregateSeries(series, categoryAxis);
135
136
  }
136
137
 
137
138
  const min = range ? range.min : 0;
@@ -304,7 +305,7 @@ class CategoricalPlotArea extends PlotAreaBase {
304
305
  return result;
305
306
  }
306
307
 
307
- aggregateSeries(series, categoryAxis, range) {
308
+ aggregateSeries(series, categoryAxis, range = null) {
308
309
  const srcData = series.data;
309
310
  if (!srcData.length) {
310
311
  return series;
@@ -314,11 +315,13 @@ class CategoricalPlotArea extends PlotAreaBase {
314
315
  const result = deepExtend({}, series);
315
316
  const aggregator = new SeriesAggregator(deepExtend({}, series), SeriesBinder.current, DefaultAggregates.current);
316
317
  const data = result.data = [];
317
-
318
318
  const dataItems = categoryAxis.options.dataItems || [];
319
319
 
320
+ // Use full range if not provided, otherwise use current range to aggregate only visible categories
321
+ const aggregateRange = range || { min: 0, max: srcPoints.length - 1 };
322
+
320
323
  const categoryItem = (idx) => {
321
- const categoryIdx = idx - range.min;
324
+ const categoryIdx = idx - aggregateRange.min;
322
325
  let point = srcPoints[idx];
323
326
  if (!point) {
324
327
  point = srcPoints[idx] = {};
@@ -335,7 +338,7 @@ class CategoricalPlotArea extends PlotAreaBase {
335
338
  return point;
336
339
  };
337
340
 
338
- for (let idx = range.min; idx <= range.max; idx++) {
341
+ for (let idx = aggregateRange.min; idx <= aggregateRange.max; idx++) {
339
342
  const point = categoryItem(idx);
340
343
  data[point.categoryIx] = point.item;
341
344
 
@@ -345,7 +348,7 @@ class CategoricalPlotArea extends PlotAreaBase {
345
348
  }
346
349
 
347
350
  if (inArray(result.type, OUT_OF_RANGE_SERIES)) {
348
- createOutOfRangePoints(result, range, categoryAxis.totalCount(), categoryItem, (idx) => srcPoints[idx]);
351
+ createOutOfRangePoints(result, aggregateRange, categoryAxis.totalCount(), categoryItem, (idx) => srcPoints[idx]);
349
352
  }
350
353
 
351
354
  categoryAxis.options.dataItems = dataItems;
@@ -1,14 +1,14 @@
1
1
  /**
2
- * The axis range.
2
+ * Represents the axis range with minimum and maximum values.
3
3
  */
4
4
  export interface AxisRange {
5
5
  /**
6
- * The axis minimum value.
6
+ * Specifies the axis minimum value.
7
7
  */
8
8
  min: number | Date;
9
9
 
10
10
  /**
11
- * The axis maximum value.
11
+ * Specifies the axis maximum value.
12
12
  */
13
13
  max: number | Date;
14
14
  }
@@ -2,13 +2,13 @@ import { geometry } from '@progress/kendo-drawing';
2
2
  import { AxisRange } from './axis-range.interface';
3
3
 
4
4
  /**
5
- * An interface for the Chart axes API.
5
+ * Represents a Chart axis instance.
6
6
  */
7
- export interface ChartAxisType {
7
+ export interface ChartAxis {
8
8
  /**
9
9
  * Returns the axis range.
10
10
  *
11
- * @returns {AxisRange} - The axis range.
11
+ * @returns {AxisRange} The axis range.
12
12
  */
13
13
  range(): AxisRange;
14
14
 
@@ -25,26 +25,25 @@ export interface ChartAxisType {
25
25
  * See [Custom Plot Bands](https://www.telerik.com/kendo-vue-ui/components/charts/elements/plot-bands#custom-plot-bands) example.
26
26
  * {% endplatform_content %}
27
27
  *
28
- * @param from - The slot start value.
29
- * @param to - The end slot value. If not specified, the `from` value is used.
30
- * @param limit - The parameters for the exported image.
31
- * @returns {Promise<string>} - Indicates whether the slot is limited to the current range.
32
- * By default, the range is limited.
28
+ * @param from The start value of the slot.
29
+ * @param to The end value of the slot. If not specified, the `from` value is used.
30
+ * @param limit Indicates whether the slot is limited to the current range. By default, the range is limited.
31
+ * @returns {geometry.Rect | geometry.Arc} The slot rectangle or arc geometry.
33
32
  */
34
33
  slot(from: string | number | Date, to?: string | number | Date, limit?: boolean): geometry.Rect | geometry.Arc;
35
34
 
36
35
  /**
37
36
  * Returns the value that corresponds to the passed surface point.
38
37
  *
39
- * @param { Point } point - The surface point of the Chart.
40
- * @returns {string | number | Date} - The value that corresponds to the point.
38
+ * @param { Point } point The surface point of the Chart.
39
+ * @returns {string | number | Date} The value that corresponds to the point.
41
40
  */
42
41
  value(point: geometry.Point): string | number | Date;
43
42
 
44
43
  /**
45
44
  * Returns the axis range which is determined by the minimum and maximum point values that are associated with the axis.
46
45
  *
47
- * @returns {AxisRange} - The value range.
46
+ * @returns {AxisRange} The value range.
48
47
  */
49
48
  valueRange(): AxisRange;
50
49
  }
@@ -1,9 +1,10 @@
1
1
  import { Group } from '@progress/kendo-drawing';
2
+ import { ChartAxis } from './chart-axis.interface';
2
3
 
3
4
  /**
4
5
  * An interface for the Chart panes.
5
6
  */
6
- export interface ChartPaneType {
7
+ export interface ChartPane {
7
8
  /**
8
9
  * The group which holds the Drawing elements of the Chart.
9
10
  */
@@ -13,4 +14,12 @@ export interface ChartPaneType {
13
14
  * The Drawing group that is used to draw the pane.
14
15
  */
15
16
  visual: Group;
17
+
18
+ /**
19
+ * Returns the axis from the pane with the specified name.
20
+ *
21
+ * @param {string} name The name of the axis.
22
+ * @returns {ChartAxis} The axis with the corresponding name.
23
+ */
24
+ findAxisByName(name: string): ChartAxis;
16
25
  }
@@ -3,7 +3,7 @@ import { MultiPath, Group } from '@progress/kendo-drawing';
3
3
  /**
4
4
  * An interface for the plot area of the Chart.
5
5
  */
6
- export interface ChartPlotAreaType {
6
+ export interface ChartPlotArea {
7
7
  /**
8
8
  * The Drawing `MultiPath` that is used to draw the background.
9
9
  */
@@ -0,0 +1,16 @@
1
+ import { SVGExportOptions } from '@progress/kendo-drawing';
2
+
3
+ /**
4
+ * Represents the Kendo UI for Angular Chart SVG export options.
5
+ */
6
+ export interface ChartSVGExportOptions extends SVGExportOptions {
7
+ /**
8
+ * Specifies the width (in pixels) of the exported SVG. If not set, the width of the exported element will be used.
9
+ */
10
+ width?: number;
11
+
12
+ /**
13
+ * Specifies the height (in pixels) of the exported SVG. If not set, the height of the exported element will be used.
14
+ */
15
+ height?: number;
16
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Represents the options for customizing the exported visual.
3
+ */
4
+ export interface ChartVisualExportOptions {
5
+ /**
6
+ * Specifies the width (in pixels) of the exported scene. Defaults to the width of the element.
7
+ */
8
+ width?: number;
9
+
10
+ /**
11
+ * Specifies the height (in pixels) of the exported scene. Defaults to the height of the element.
12
+ */
13
+ height?: number;
14
+ }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The axis options for the Chart events.
2
+ * The axis options for Chart events.
3
3
  */
4
4
  export interface EventAxisOptions {
5
5
  /**
@@ -0,0 +1,16 @@
1
+ import { drawing } from '@progress/kendo-drawing';
2
+
3
+ /**
4
+ * Represents a series point marker.
5
+ */
6
+ export interface SeriesPointMarker {
7
+ /**
8
+ * Specifies the point marker options.
9
+ */
10
+ options?: any;
11
+
12
+ /**
13
+ * Specifies the Drawing element used to draw the series point marker.
14
+ */
15
+ visual?: drawing.Element;
16
+ }
@@ -1,46 +1,67 @@
1
1
  import { drawing } from '@progress/kendo-drawing';
2
+ import { SeriesPointMarker } from './series-point-marker.interface';
2
3
 
3
4
  /**
4
- * A series point.
5
+ * Represents a series point in the Chart.
5
6
  */
6
- export interface SeriesPointType {
7
+ export interface SeriesPoint {
7
8
  /**
8
- * The point category value. Available only for the Categorical points (Bar, Line, and other).
9
+ * Specifies the category value of the point. Available for Categorical points such as Bar and Line series.
9
10
  */
10
- category?: string | Date | number;
11
+ category?: string|Date|number;
11
12
 
12
13
  /**
13
- * The point `dataItem`.
14
+ * Specifies the `dataItem` associated with the point.
14
15
  */
15
16
  dataItem?: any;
16
17
 
17
18
  /**
18
- * The point options.
19
+ * Specifies the options for the point.
19
20
  */
20
21
  options?: any;
21
22
 
22
23
  /**
23
- * The point value represented as a percentage value. Available only for the Donut, Pie, and 100% Stacked chart points.
24
+ * Defines the index of the point in the series. Available for Categorical and Funnel charts.
25
+ */
26
+ index?: number;
27
+
28
+ /**
29
+ * Specifies the marker associated with the point, if any. Available only for Line and ScatterLine series.
30
+ */
31
+ marker?: SeriesPointMarker;
32
+
33
+ /**
34
+ * Specifies the value of the point as a percentage. Available for Donut, Pie, and 100% Stacked Chart points.
24
35
  */
25
36
  percentage?: number;
26
37
 
27
38
  /**
28
- * The sum of point values since the last `"runningTotal"` summary point. Available for the Waterfall series points.
39
+ * Defines the sum of point values since the last `"runningTotal"` summary point. Available for the Waterfall series points.
29
40
  */
30
41
  runningTotal?: number;
31
42
 
32
43
  /**
33
- * The sum of all previous series values. Available for the Waterfall series points.
44
+ * Specifies the sum of all previous series values. Available for the Waterfall series points.
34
45
  */
35
46
  total?: number;
36
47
 
37
48
  /**
38
- * The point value.
49
+ * Specifies the minimum value for the series. Available for the Heatmap series points.
50
+ */
51
+ min?: number;
52
+
53
+ /**
54
+ * Specifies the maximum value for the series. Available for the Heatmap series points.
55
+ */
56
+ max?: number;
57
+
58
+ /**
59
+ * Represents the value of the point.
39
60
  */
40
61
  value?: any;
41
62
 
42
63
  /**
43
- * The Drawing element used to draw the point.
64
+ * Provides the Drawing element used to draw the point.
44
65
  */
45
66
  visual?: drawing.Element;
46
67
  }
@@ -5,3 +5,7 @@ export * from './api-types/chart-plotarea.interface';
5
5
  export * from './api-types/event-axis-options.interface';
6
6
  export * from './api-types/event-series-options.interface';
7
7
  export * from './api-types/series-point.interface';
8
+ export * from './api-types/series-point-marker.interface';
9
+ export * from './api-types/chart-svg-export-options.interface';
10
+ export * from './api-types/chart-visual-export-options.interface';
11
+
@@ -3,15 +3,10 @@
3
3
  *
4
4
  * The possible values are:
5
5
  * - `"normal"`&mdash;Connects the values with a straight line.
6
- * - `"step"`&mdash;Connects the values with a right-angled line. Available when series type is set to `"line"`.
6
+ * - `"step"`&mdash;Connects the values with a right-angled line. Available when [`series.type`]({% slug api_charts_series %}#type) is set to `"line"`.
7
7
  * - `"smooth"`&mdash;Connects the values with a smooth line. Not supported for stacked area series with missing values.
8
8
  *
9
9
  * {% platform_content angular %}
10
- * See also:
11
- * - [`series.type`](https://www.telerik.com/kendo-angular-ui/components/charts/api/series#type)
12
- * {% endplatform_content %}
13
- *
14
- * {% platform_content angular %}
15
10
  * @example
16
11
  * ```ts
17
12
  * import { Component } from '@angular/core';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Specifies the alignment of the label when series type is set to `"donut"`, `"funnel"`, `"pyramid"` or `"pie"`.
2
+ * Specifies the alignment of the label when [`series.type`]({% slug api_charts_series %}#type) is set to `"donut"`, `"funnel"`, `"pyramid"` or `"pie"`.
3
3
  *
4
4
  * The supported values for `"donut"` and `"pie"` are:
5
5
  *