@c8y/ngx-components 1024.20.0 → 1024.20.1
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/fesm2022/c8y-ngx-components-echart-models.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +529 -323
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +13 -5
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/locales/de.po +6 -0
- package/locales/es.po +6 -0
- package/locales/fr.po +6 -0
- package/locales/ja_JP.po +6 -0
- package/locales/ko.po +6 -0
- package/locales/nl.po +6 -0
- package/locales/pl.po +6 -0
- package/locales/pt_BR.po +6 -0
- package/locales/zh_CN.po +6 -0
- package/locales/zh_TW.po +6 -0
- package/package.json +1 -1
- package/types/c8y-ngx-components-echart-models.d.ts +2 -0
- package/types/c8y-ngx-components-echart-models.d.ts.map +1 -1
- package/types/c8y-ngx-components-echart.d.ts +70 -1
- package/types/c8y-ngx-components-echart.d.ts.map +1 -1
- package/types/c8y-ngx-components-widgets-implementations-datapoints-graph.d.ts.map +1 -1
|
@@ -733,13 +733,20 @@ class DatapointsGraphWidgetViewComponent {
|
|
|
733
733
|
this.updateSelectedItems();
|
|
734
734
|
const getDatapointId = (dp) => `${dp.__target?.id}${dp.fragment}${dp.series}`;
|
|
735
735
|
const isLoaded = this.loadedDatapoints.find(dp => getDatapointId(dp) === getDatapointId(datapoint));
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
736
|
+
// A datapoint can be "loaded" yet no longer present in the chart if a full rebuild ran while it
|
|
737
|
+
// was hidden (the fetch pipeline drops inactive datapoints). Toggling legend visibility would
|
|
738
|
+
// then do nothing, so re-fetch instead of just flipping the legend.
|
|
739
|
+
const needsReload = datapoint.__active &&
|
|
740
|
+
(!isLoaded || !this.chartComponent.hasRenderedDatapointSeries(datapoint));
|
|
741
|
+
if (needsReload) {
|
|
742
|
+
// Datapoint being shown but not loaded/rendered (or data is stale) - trigger full reload
|
|
743
|
+
if (!isLoaded) {
|
|
744
|
+
this.loadedDatapoints.push(datapoint);
|
|
745
|
+
}
|
|
739
746
|
this.displayConfig = { ...this.displayConfig };
|
|
740
747
|
}
|
|
741
748
|
else {
|
|
742
|
-
// Datapoint already loaded
|
|
749
|
+
// Datapoint already loaded and rendered OR being hidden - just toggle visibility in echarts
|
|
743
750
|
this.chartComponent.toggleDatapointSeriesVisibility(datapoint);
|
|
744
751
|
}
|
|
745
752
|
}
|
|
@@ -764,7 +771,8 @@ class DatapointsGraphWidgetViewComponent {
|
|
|
764
771
|
const params = {
|
|
765
772
|
data: {
|
|
766
773
|
itemType: alarm.filters.type
|
|
767
|
-
}
|
|
774
|
+
},
|
|
775
|
+
seriesName: `${alarm.filters.type}/${alarm.__target?.id}-markPoint`
|
|
768
776
|
};
|
|
769
777
|
this.chartComponent.onChartClick(params);
|
|
770
778
|
}
|