@flexem/fc-gui 3.0.0-alpha.32 → 3.0.0-alpha.35
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/CHANGELOG.md +15 -0
- package/bundles/@flexem/fc-gui.umd.js +49 -5
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +4 -4
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/elements/air-quality/air-quality-element.js +3 -3
- package/elements/historical-curve/historical-curve.element.js +46 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -140,3 +140,18 @@
|
|
|
140
140
|
#### Bug Fix
|
|
141
141
|
1. FLEXCLOUD-2100: 苏州水星:历史曲线组件支持Y轴自定义设定范围
|
|
142
142
|
|
|
143
|
+
|
|
144
|
+
## 3.0.0-alpha.33(2022-07-08)
|
|
145
|
+
### Web端
|
|
146
|
+
#### Bug Fix
|
|
147
|
+
1. FLEXCLOUD-2171: 设备仪表盘:空气质量指数元件数值展示优化
|
|
148
|
+
|
|
149
|
+
## 3.0.0-alpha.34(2022-08-31)
|
|
150
|
+
### Web端
|
|
151
|
+
#### Features
|
|
152
|
+
1. FLEXCLOUD-2218: 组态设计:历史曲线表,超过24小时,按天统计,X轴显示增加日期(年月日)
|
|
153
|
+
|
|
154
|
+
## 3.0.0-alpha.35(2022-08-31)
|
|
155
|
+
### Web端
|
|
156
|
+
#### Features
|
|
157
|
+
1. FLEXCLOUD-2218: 组态设计:历史曲线表,超过24小时,按天统计,X轴显示增加日期(年月日)
|
|
@@ -26919,7 +26919,12 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
26919
26919
|
renderCommonProperty(chart, chartWidth, chartHeight, data) {
|
|
26920
26920
|
chart.tooltip.headerFormatter(d => this.timeFormat(d, '%x %X'));
|
|
26921
26921
|
if (this.model.displaySetting.showAxis) {
|
|
26922
|
-
chart.xAxis.showMaxMin(true).tickFormat(d =>
|
|
26922
|
+
chart.xAxis.showMaxMin(true).tickFormat(d => {
|
|
26923
|
+
if (this.currentTimePeriod >= 3) {
|
|
26924
|
+
return this.timeFormat(d, '%y-%m-%d');
|
|
26925
|
+
}
|
|
26926
|
+
return this.timeFormat(Number(d), '%X');
|
|
26927
|
+
});
|
|
26923
26928
|
if (this.model.displaySetting.axisSetting) {
|
|
26924
26929
|
if (this.model.displaySetting.axisSetting.showAxisLabel && this.model.displaySetting.axisSetting.axisLabelFont) {
|
|
26925
26930
|
chart.xAxis.fontSize(this.model.displaySetting.axisSetting.axisLabelFont.fontSize);
|
|
@@ -26944,15 +26949,54 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
26944
26949
|
chart.update();
|
|
26945
26950
|
this.rootElement.selectAll('.nv-noData').attr('x', chartWidth / 2).attr('y', chartHeight / 2 + this.displayOption.operationAreaHeight);
|
|
26946
26951
|
});
|
|
26952
|
+
const fontSize = this.model.displaySetting.axisSetting.axisLabelFont.fontSize;
|
|
26947
26953
|
this.rootElement.selectAll('.domain').style('stroke-opacity', 1);
|
|
26948
26954
|
if (this.model.displaySetting.showAxis && this.model.displaySetting.axisSetting) {
|
|
26949
26955
|
const axisColor = this.model.displaySetting.axisSetting.axisColor;
|
|
26950
26956
|
this.rootElement.selectAll('.domain').style('stroke', axisColor);
|
|
26951
26957
|
if (this.model.displaySetting.axisSetting.showAxisLabel) {
|
|
26952
|
-
const fontSize = this.model.displaySetting.axisSetting.axisLabelFont.fontSize;
|
|
26953
26958
|
this.rootElement.selectAll('.nv-axisMaxMin').select('text').style('font-size', fontSize);
|
|
26954
26959
|
}
|
|
26955
26960
|
}
|
|
26961
|
+
const self = this;
|
|
26962
|
+
if (self.currentTimePeriod === 3 || self.currentTimePeriod === 4 || self.currentTimePeriod === 5) {
|
|
26963
|
+
this.rootElement
|
|
26964
|
+
.selectAll('.nv-x')
|
|
26965
|
+
.selectAll('.tick')
|
|
26966
|
+
.selectAll('text')
|
|
26967
|
+
.data(function (d) {
|
|
26968
|
+
return [self.timeFormat(Number(d), '%y-%m-%d'), self.timeFormat(Number(d), '%H:%M:%S')];
|
|
26969
|
+
})
|
|
26970
|
+
.enter()
|
|
26971
|
+
.append('text')
|
|
26972
|
+
.attr('class', 'full-date')
|
|
26973
|
+
.attr('x', 0)
|
|
26974
|
+
.attr('y', 0)
|
|
26975
|
+
.attr('dy', '2.4em')
|
|
26976
|
+
.style('text-anchor', 'middle')
|
|
26977
|
+
.style('font-size', fontSize)
|
|
26978
|
+
.text((d) => d);
|
|
26979
|
+
this.rootElement
|
|
26980
|
+
.selectAll('.nv-axisMaxMin-x')
|
|
26981
|
+
.selectAll('text')
|
|
26982
|
+
.data(function (d) {
|
|
26983
|
+
return [self.timeFormat(Number(d), '%y-%m-%d'), self.timeFormat(Number(d), '%H:%M:%S')];
|
|
26984
|
+
})
|
|
26985
|
+
.enter()
|
|
26986
|
+
.append('text')
|
|
26987
|
+
.attr('class', 'full-date')
|
|
26988
|
+
.attr('x', 0)
|
|
26989
|
+
.attr('y', 0)
|
|
26990
|
+
.attr('dy', '2.4em')
|
|
26991
|
+
.style('text-anchor', 'middle')
|
|
26992
|
+
.style('font-size', fontSize)
|
|
26993
|
+
.text((d) => d);
|
|
26994
|
+
}
|
|
26995
|
+
else {
|
|
26996
|
+
this.rootElement
|
|
26997
|
+
.selectAll('.full-date')
|
|
26998
|
+
.remove();
|
|
26999
|
+
}
|
|
26956
27000
|
}
|
|
26957
27001
|
renderOperationArea(chartWidth, chartHeight) {
|
|
26958
27002
|
const operationArea = this.rootElement.append('g').attr('transform', `translate(0,${chartHeight + this.displayOption.operationAreaMarginTop})`)
|
|
@@ -30141,9 +30185,9 @@ class air_quality_element_AirQualityElement extends conditional_display_element_
|
|
|
30141
30185
|
this.buildBackgroudRect(airQualitySvg, backgroundColor);
|
|
30142
30186
|
this.buildLocGroup(airQualitySvg, airQuality.city, fontColor);
|
|
30143
30187
|
this.buildAirQualityText(airQualitySvg, 130, 55, airQuality.aqi, fontColor, 53);
|
|
30144
|
-
this.buildAirQualityText(airQualitySvg,
|
|
30188
|
+
this.buildAirQualityText(airQualitySvg, 220, 28, '空气质量', fontColor);
|
|
30145
30189
|
this.buildRectBackgroundForAqi(airQualitySvg, airQuality.level);
|
|
30146
|
-
this.buildAirQualityText(airQualitySvg,
|
|
30190
|
+
this.buildAirQualityText(airQualitySvg, 220, 49, airQuality.category, fontColor);
|
|
30147
30191
|
this.buildAirQualityText(airQualitySvg, 30, 75, 'PM2.5', fontColor, 12, 0.8);
|
|
30148
30192
|
this.buildAirQualityText(airQualitySvg, 30, 95, airQuality.pm25, fontColor, 15);
|
|
30149
30193
|
this.buildAirQualityText(airQualitySvg, 80, 75, 'PM10', fontColor, 12, 0.8);
|
|
@@ -30206,7 +30250,7 @@ class air_quality_element_AirQualityElement extends conditional_display_element_
|
|
|
30206
30250
|
backgroundColor = '#A10E0E';
|
|
30207
30251
|
}
|
|
30208
30252
|
airQualitySvg.append('rect')
|
|
30209
|
-
.attr('x', '
|
|
30253
|
+
.attr('x', '195')
|
|
30210
30254
|
.attr('y', '35')
|
|
30211
30255
|
.attr('rx', '5')
|
|
30212
30256
|
.attr('width', '50')
|