@c8y/ngx-components 1021.75.8 → 1021.77.0
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/branding/shared/supports-branding.service.d.ts.map +1 -1
- package/core/common/ApplicationOptions.d.ts +2 -2
- package/core/dashboard/widgets-dashboard.component.d.ts +4 -2
- package/core/dashboard/widgets-dashboard.component.d.ts.map +1 -1
- package/core/login/login.component.d.ts.map +1 -1
- package/core/login/login.service.d.ts +1 -0
- package/core/login/login.service.d.ts.map +1 -1
- package/core/navigator/navigator-bottom/navigator-bottom.service.d.ts +3 -1
- package/core/navigator/navigator-bottom/navigator-bottom.service.d.ts.map +1 -1
- package/datapoint-explorer/view/datapoint-explorer.component.d.ts.map +1 -1
- package/echart/charts.component.d.ts.map +1 -1
- package/echart/models/datapoints-graph-widget.model.d.ts +10 -0
- package/echart/models/datapoints-graph-widget.model.d.ts.map +1 -1
- package/echart/services/chart-realtime.service.d.ts +2 -5
- package/echart/services/chart-realtime.service.d.ts.map +1 -1
- package/echart/services/echarts-options.service.d.ts +4 -13
- package/echart/services/echarts-options.service.d.ts.map +1 -1
- package/echart/services/y-axis.service.d.ts +1 -1
- package/echart/services/y-axis.service.d.ts.map +1 -1
- package/esm2022/branding/shared/supports-branding.service.mjs +6 -3
- package/esm2022/core/beta-feature/beta-preview-button.component.mjs +3 -3
- package/esm2022/core/beta-feature/beta-preview.component.mjs +3 -3
- package/esm2022/core/common/ApplicationOptions.mjs +1 -1
- package/esm2022/core/dashboard/widgets-dashboard.component.mjs +9 -5
- package/esm2022/core/login/login.component.mjs +2 -1
- package/esm2022/core/login/login.service.mjs +5 -1
- package/esm2022/core/navigator/navigator-bottom/navigator-bottom.service.mjs +13 -6
- package/esm2022/datapoint-explorer/view/datapoint-explorer.component.mjs +4 -3
- package/esm2022/device-map/device-map.component.mjs +2 -2
- package/esm2022/echart/charts.component.mjs +8 -2
- package/esm2022/echart/models/datapoints-graph-widget.model.mjs +1 -1
- package/esm2022/echart/services/chart-realtime.service.mjs +1 -1
- package/esm2022/echart/services/echarts-options.service.mjs +23 -15
- package/esm2022/echart/services/y-axis.service.mjs +32 -1
- package/esm2022/map/cluster-map.component.mjs +6 -3
- package/esm2022/map/map-status.component.mjs +23 -5
- package/esm2022/map/map.model.mjs +5 -2
- package/esm2022/map/map.service.mjs +17 -1
- package/esm2022/widgets/implementations/datapoints-graph/datapoints-graph-config/datapoints-graph-widget-config.component.mjs +4 -3
- package/esm2022/widgets/implementations/map/map-widget-config.component.mjs +25 -6
- package/esm2022/widgets/implementations/map/map-widget.component.mjs +40 -11
- package/fesm2022/c8y-ngx-components-branding-shared.mjs +5 -2
- package/fesm2022/c8y-ngx-components-branding-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +3 -2
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-map.mjs +1 -1
- package/fesm2022/c8y-ngx-components-device-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart-models.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +60 -15
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-map.mjs +47 -7
- package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +3 -2
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs +67 -19
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +26 -12
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/locales.pot +19 -7
- package/map/cluster-map.component.d.ts +2 -1
- package/map/cluster-map.component.d.ts.map +1 -1
- package/map/map-status.component.d.ts +7 -2
- package/map/map-status.component.d.ts.map +1 -1
- package/map/map.model.d.ts +1 -0
- package/map/map.model.d.ts.map +1 -1
- package/map/map.service.d.ts +1 -0
- package/map/map.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/widgets/implementations/datapoints-graph/datapoints-graph-config/datapoints-graph-widget-config.component.d.ts.map +1 -1
- package/widgets/implementations/map/map-widget-config.component.d.ts +1 -0
- package/widgets/implementations/map/map-widget-config.component.d.ts.map +1 -1
- package/widgets/implementations/map/map-widget.component.d.ts +10 -4
- package/widgets/implementations/map/map-widget.component.d.ts.map +1 -1
|
@@ -71,6 +71,37 @@ class YAxisService {
|
|
|
71
71
|
}
|
|
72
72
|
getYAxis(datapointsWithValues, YAxisOptions) {
|
|
73
73
|
const YAxisPlacement = this.getYAxisPlacement(datapointsWithValues);
|
|
74
|
+
if (YAxisOptions.forceMergeDatapoints) {
|
|
75
|
+
return {
|
|
76
|
+
nameLocation: 'middle',
|
|
77
|
+
nameGap: 20,
|
|
78
|
+
type: 'value',
|
|
79
|
+
animation: true,
|
|
80
|
+
axisLabel: {
|
|
81
|
+
fontSize: 10,
|
|
82
|
+
show: true
|
|
83
|
+
},
|
|
84
|
+
axisLine: {
|
|
85
|
+
show: true,
|
|
86
|
+
lineStyle: {
|
|
87
|
+
color: 'black'
|
|
88
|
+
},
|
|
89
|
+
onZero: false
|
|
90
|
+
},
|
|
91
|
+
splitLine: {
|
|
92
|
+
show: YAxisOptions.showSplitLines
|
|
93
|
+
},
|
|
94
|
+
axisTick: {
|
|
95
|
+
show: true
|
|
96
|
+
},
|
|
97
|
+
axisPointer: {
|
|
98
|
+
show: false,
|
|
99
|
+
label: {
|
|
100
|
+
show: false
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
74
105
|
const matchingDpSet = new Set();
|
|
75
106
|
const firstOccurrence = new Set();
|
|
76
107
|
return datapointsWithValues.map((dp, index) => {
|
|
@@ -348,11 +379,12 @@ class EchartsOptionsService {
|
|
|
348
379
|
const yAxis = this.yAxisService.getYAxis(datapointsWithValues, {
|
|
349
380
|
showSplitLines: showSplitLines.YAxis,
|
|
350
381
|
mergeMatchingDatapoints: displayOptions.mergeMatchingDatapoints,
|
|
382
|
+
forceMergeDatapoints: displayOptions.forceMergeDatapoints,
|
|
351
383
|
showLabelAndUnit: displayOptions.showLabelAndUnit
|
|
352
384
|
});
|
|
353
|
-
const leftAxis = yAxis.filter(yx => yx.position === 'left');
|
|
354
|
-
const gridLeft = leftAxis.length ? leftAxis.length * this.yAxisService.Y_AXIS_OFFSET :
|
|
355
|
-
const rightAxis = yAxis.filter(yx => yx.position === 'right');
|
|
385
|
+
const leftAxis = Array.isArray(yAxis) ? yAxis.filter(yx => yx.position === 'left') : [];
|
|
386
|
+
const gridLeft = leftAxis.length ? leftAxis.length * this.yAxisService.Y_AXIS_OFFSET : 32;
|
|
387
|
+
const rightAxis = Array.isArray(yAxis) ? yAxis.filter(yx => yx.position === 'right') : [];
|
|
356
388
|
const gridRight = rightAxis.length ? rightAxis.length * this.yAxisService.Y_AXIS_OFFSET : 16;
|
|
357
389
|
let intervalInMs = this.calculateExtendedIntervalInMs(selectedTimeRange?.interval || timeRange.interval || 'hours', selectedTimeRange || timeRange);
|
|
358
390
|
if (sliderZoomUsed) {
|
|
@@ -437,7 +469,7 @@ class EchartsOptionsService {
|
|
|
437
469
|
},
|
|
438
470
|
yAxis,
|
|
439
471
|
series: [
|
|
440
|
-
...this.getAggregatedSeries(aggregatedDatapoints || []).filter(series => series !== undefined),
|
|
472
|
+
...this.getAggregatedSeries(aggregatedDatapoints || [], displayOptions).filter(series => series !== undefined),
|
|
441
473
|
...this.getChartSeries(datapointsWithValues, events, alarms, displayOptions)
|
|
442
474
|
]
|
|
443
475
|
};
|
|
@@ -472,16 +504,16 @@ class EchartsOptionsService {
|
|
|
472
504
|
}
|
|
473
505
|
return intervalInMs;
|
|
474
506
|
}
|
|
475
|
-
getAggregatedSeries(aggregatedDatapoints) {
|
|
507
|
+
getAggregatedSeries(aggregatedDatapoints, displayOptions) {
|
|
476
508
|
const series = [];
|
|
477
509
|
aggregatedDatapoints.forEach((dp, idx) => {
|
|
478
510
|
const renderType = dp.renderType || 'min';
|
|
479
511
|
if (renderType === 'area') {
|
|
480
|
-
series.push(this.getSingleSeries(dp, 'min', idx, true, 'aggr'));
|
|
481
|
-
series.push(this.getSingleSeries(dp, 'max', idx, true, 'aggr'));
|
|
512
|
+
series.push(this.getSingleSeries(dp, 'min', idx, true, displayOptions, 'aggr'));
|
|
513
|
+
series.push(this.getSingleSeries(dp, 'max', idx, true, displayOptions, 'aggr'));
|
|
482
514
|
}
|
|
483
515
|
else {
|
|
484
|
-
series.push(this.getSingleSeries(dp, renderType, idx, false, 'aggr'));
|
|
516
|
+
series.push(this.getSingleSeries(dp, renderType, idx, false, displayOptions, 'aggr'));
|
|
485
517
|
}
|
|
486
518
|
});
|
|
487
519
|
series.forEach((s) => {
|
|
@@ -507,7 +539,14 @@ class EchartsOptionsService {
|
|
|
507
539
|
* @param itemType - The item type.
|
|
508
540
|
* @param id - The id of the device
|
|
509
541
|
*/
|
|
510
|
-
getAlarmOrEventSeries(dp, renderType, isMinMaxChart = false, items = [], itemType = 'alarm', displayOptions = {
|
|
542
|
+
getAlarmOrEventSeries(dp, renderType, isMinMaxChart = false, items = [], itemType = 'alarm', displayOptions = {
|
|
543
|
+
displayMarkedLine: true,
|
|
544
|
+
displayMarkedPoint: true,
|
|
545
|
+
mergeMatchingDatapoints: false,
|
|
546
|
+
forceMergeDatapoints: false,
|
|
547
|
+
showLabelAndUnit: false,
|
|
548
|
+
showSlider: false
|
|
549
|
+
}, id, idx, realtime) {
|
|
511
550
|
if (!items.length) {
|
|
512
551
|
return [];
|
|
513
552
|
}
|
|
@@ -804,11 +843,11 @@ class EchartsOptionsService {
|
|
|
804
843
|
datapointsWithValues.forEach((dp, idx) => {
|
|
805
844
|
const renderType = dp.renderType || 'min';
|
|
806
845
|
if (renderType === 'area') {
|
|
807
|
-
series.push(this.getSingleSeries(dp, 'min', idx, true));
|
|
808
|
-
series.push(this.getSingleSeries(dp, 'max', idx, true));
|
|
846
|
+
series.push(this.getSingleSeries(dp, 'min', idx, true, displayOptions));
|
|
847
|
+
series.push(this.getSingleSeries(dp, 'max', idx, true, displayOptions));
|
|
809
848
|
}
|
|
810
849
|
else {
|
|
811
|
-
series.push(this.getSingleSeries(dp, renderType, idx, false));
|
|
850
|
+
series.push(this.getSingleSeries(dp, renderType, idx, false, displayOptions));
|
|
812
851
|
}
|
|
813
852
|
const newEventSeries = this.getAlarmOrEventSeries(dp, renderType, false, events, 'event', displayOptions, null, idx);
|
|
814
853
|
const newAlarmSeries = this.getAlarmOrEventSeries(dp, renderType, false, alarms, 'alarm', displayOptions, null, idx);
|
|
@@ -1084,7 +1123,7 @@ class EchartsOptionsService {
|
|
|
1084
1123
|
}
|
|
1085
1124
|
}, []);
|
|
1086
1125
|
}
|
|
1087
|
-
getSingleSeries(dp, renderType, idx, isMinMaxChart = false, seriesType = '') {
|
|
1126
|
+
getSingleSeries(dp, renderType, idx, isMinMaxChart = false, displayOptions, seriesType = '') {
|
|
1088
1127
|
const datapointId = dp.__target?.id + dp.fragment + dp.series;
|
|
1089
1128
|
return {
|
|
1090
1129
|
datapointId,
|
|
@@ -1099,7 +1138,7 @@ class EchartsOptionsService {
|
|
|
1099
1138
|
data: Object.entries(dp.values).map(([dateString, values]) => {
|
|
1100
1139
|
return [dateString, values[0][renderType]];
|
|
1101
1140
|
}),
|
|
1102
|
-
yAxisIndex: idx,
|
|
1141
|
+
...(displayOptions.forceMergeDatapoints ? {} : { yAxisIndex: idx }),
|
|
1103
1142
|
...this.chartTypesService.getSeriesOptions(dp, isMinMaxChart, renderType)
|
|
1104
1143
|
};
|
|
1105
1144
|
}
|
|
@@ -1799,7 +1838,11 @@ class ChartsComponent {
|
|
|
1799
1838
|
if (activeDatapoints && this.config.realtime && this.echartsInstance) {
|
|
1800
1839
|
this.chartRealtimeService.startRealtime(this.echartsInstance, activeDatapoints, this.getTimeRange(), dp => this.datapointOutOfSync.emit(dp), timeRange => this.timeRangeChangeOnRealtime.emit(timeRange), this.config.alarmsEventsConfigs, {
|
|
1801
1840
|
displayMarkedLine: this.config.displayMarkedLine || false,
|
|
1802
|
-
displayMarkedPoint: this.config.displayMarkedPoint || false
|
|
1841
|
+
displayMarkedPoint: this.config.displayMarkedPoint || false,
|
|
1842
|
+
mergeMatchingDatapoints: this.config.mergeMatchingDatapoints || false,
|
|
1843
|
+
forceMergeDatapoints: this.config.forceMergeDatapoints || false,
|
|
1844
|
+
showLabelAndUnit: this.config.showLabelAndUnit || false,
|
|
1845
|
+
showSlider: this.config.showSlider || false
|
|
1803
1846
|
});
|
|
1804
1847
|
}
|
|
1805
1848
|
}
|
|
@@ -1840,6 +1883,7 @@ class ChartsComponent {
|
|
|
1840
1883
|
displayMarkedLine: this.config.displayMarkedLine || false,
|
|
1841
1884
|
displayMarkedPoint: this.config.displayMarkedPoint || false,
|
|
1842
1885
|
mergeMatchingDatapoints: this.config.mergeMatchingDatapoints || false,
|
|
1886
|
+
forceMergeDatapoints: this.config.forceMergeDatapoints || false,
|
|
1843
1887
|
showLabelAndUnit: this.config.showLabelAndUnit || false,
|
|
1844
1888
|
showSlider: this.config.showSlider || false
|
|
1845
1889
|
}, undefined, aggregatedDatapoints);
|
|
@@ -1860,6 +1904,7 @@ class ChartsComponent {
|
|
|
1860
1904
|
displayMarkedLine: this.config.displayMarkedLine || false,
|
|
1861
1905
|
displayMarkedPoint: this.config.displayMarkedPoint || false,
|
|
1862
1906
|
mergeMatchingDatapoints: this.config.mergeMatchingDatapoints || false,
|
|
1907
|
+
forceMergeDatapoints: this.config.forceMergeDatapoints || false,
|
|
1863
1908
|
showLabelAndUnit: this.config.showLabelAndUnit || false,
|
|
1864
1909
|
showSlider: this.config.showSlider || false
|
|
1865
1910
|
}, timeRange, aggregatedDatapoints, true);
|