@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.
- package/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/chart/plotarea/categorical-plotarea.js +9 -6
- package/dist/es2015/chart/plotarea/categorical-plotarea.js +9 -6
- package/dist/npm/api-types/axis-range.interface.d.ts +3 -3
- package/dist/npm/api-types/chart-axis.interface.d.ts +10 -11
- package/dist/npm/api-types/chart-pane.interface.d.ts +10 -1
- package/dist/npm/api-types/chart-plotarea.interface.d.ts +1 -1
- package/dist/npm/api-types/chart-svg-export-options.interface.d.ts +16 -0
- package/dist/npm/api-types/chart-visual-export-options.interface.d.ts +14 -0
- package/dist/npm/api-types/event-axis-options.interface.d.ts +1 -1
- package/dist/npm/api-types/series-point-marker.interface.d.ts +16 -0
- package/dist/npm/api-types/series-point.interface.d.ts +32 -11
- package/dist/npm/api-types.d.ts +4 -0
- package/dist/npm/field-types/line-style.d.ts +1 -6
- package/dist/npm/field-types/series-labels-alignment.d.ts +1 -1
- package/dist/npm/main.js +11 -6
- package/dist/npm/option-types/axis-crosshair-tooltip.interface.d.ts +6 -0
- package/dist/npm/option-types/axis-defaults/crosshair.interface.d.ts +1 -1
- package/dist/npm/option-types/axis-defaults/labels.interface.d.ts +13 -2
- package/dist/npm/option-types/axis-defaults/title.interface.d.ts +3 -0
- package/dist/npm/option-types/category-axis-item/crosshair.interface.d.ts +1 -1
- package/dist/npm/option-types/category-axis-item/highlight.interface.d.ts +28 -0
- package/dist/npm/option-types/category-axis-item/labels.interface.d.ts +29 -7
- package/dist/npm/option-types/category-axis-item/notes.label.interface.d.ts +10 -1
- package/dist/npm/option-types/category-axis-item.interface.d.ts +10 -1
- package/dist/npm/option-types/navigator/hint.interface.d.ts +1 -1
- package/dist/npm/option-types/navigator.interface.d.ts +2 -2
- package/dist/npm/option-types/pane/title.interface.d.ts +1 -1
- package/dist/npm/option-types/series-defaults/labels.from.interface.d.ts +10 -1
- package/dist/npm/option-types/series-defaults/labels.interface.d.ts +12 -3
- package/dist/npm/option-types/series-defaults/labels.to.interface.d.ts +6 -0
- package/dist/npm/option-types/series-defaults/notes.label.interface.d.ts +6 -0
- package/dist/npm/option-types/series-defaults/tooltip.interface.d.ts +10 -1
- package/dist/npm/option-types/series-item/error-bars.interface.d.ts +3 -3
- package/dist/npm/option-types/series-item/highlight.interface.d.ts +5 -5
- package/dist/npm/option-types/series-item/labels.from.interface.d.ts +9 -1
- package/dist/npm/option-types/series-item/labels.interface.d.ts +16 -7
- package/dist/npm/option-types/series-item/labels.to.interface.d.ts +10 -1
- package/dist/npm/option-types/series-item/notes.label.interface.d.ts +9 -1
- package/dist/npm/option-types/series-item/tooltip.interface.d.ts +9 -1
- package/dist/npm/option-types/tooltip.interface.d.ts +6 -0
- package/dist/npm/option-types/value-axis-item/crosshair.interface.d.ts +1 -1
- package/dist/npm/option-types/value-axis-item/labels.interface.d.ts +10 -1
- package/dist/npm/option-types/value-axis-item/notes.label.interface.d.ts +6 -0
- package/dist/npm/option-types/x-axis-item/crosshair.interface.d.ts +1 -1
- package/dist/npm/option-types/x-axis-item/labels.interface.d.ts +28 -6
- package/dist/npm/option-types/x-axis-item/notes.label.interface.d.ts +10 -1
- package/dist/npm/option-types/y-axis-item/crosshair.interface.d.ts +1 -1
- package/dist/npm/option-types/y-axis-item/labels.interface.d.ts +28 -6
- package/dist/npm/option-types/y-axis-item/notes.label.interface.d.ts +10 -1
- package/dist/npm/property-types.d.ts +3 -2
- package/dist/systemjs/kendo-charts.js +1 -1
- 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
|
-
|
|
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 -
|
|
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 =
|
|
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,
|
|
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
|
-
|
|
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 -
|
|
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 =
|
|
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,
|
|
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
|
-
*
|
|
2
|
+
* Represents the axis range with minimum and maximum values.
|
|
3
3
|
*/
|
|
4
4
|
export interface AxisRange {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Specifies the axis minimum value.
|
|
7
7
|
*/
|
|
8
8
|
min: number | Date;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
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
|
-
*
|
|
5
|
+
* Represents a Chart axis instance.
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface ChartAxis {
|
|
8
8
|
/**
|
|
9
9
|
* Returns the axis range.
|
|
10
10
|
*
|
|
11
|
-
* @returns {AxisRange}
|
|
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
|
|
29
|
-
* @param to
|
|
30
|
-
* @param limit
|
|
31
|
-
* @returns {
|
|
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
|
|
40
|
-
* @returns {string | number | Date}
|
|
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}
|
|
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
|
|
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
|
|
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
|
+
}
|
|
@@ -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
|
-
*
|
|
5
|
+
* Represents a series point in the Chart.
|
|
5
6
|
*/
|
|
6
|
-
export interface
|
|
7
|
+
export interface SeriesPoint {
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* Specifies the category value of the point. Available for Categorical points such as Bar and Line series.
|
|
9
10
|
*/
|
|
10
|
-
category?: string
|
|
11
|
+
category?: string|Date|number;
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* Specifies the `dataItem` associated with the point.
|
|
14
15
|
*/
|
|
15
16
|
dataItem?: any;
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Specifies the options for the point.
|
|
19
20
|
*/
|
|
20
21
|
options?: any;
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
64
|
+
* Provides the Drawing element used to draw the point.
|
|
44
65
|
*/
|
|
45
66
|
visual?: drawing.Element;
|
|
46
67
|
}
|
package/dist/npm/api-types.d.ts
CHANGED
|
@@ -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"`—Connects the values with a straight line.
|
|
6
|
-
* - `"step"`—Connects the values with a right-angled line. Available when series type is set to `"line"`.
|
|
6
|
+
* - `"step"`—Connects the values with a right-angled line. Available when [`series.type`]({% slug api_charts_series %}#type) is set to `"line"`.
|
|
7
7
|
* - `"smooth"`—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
|
*
|