@flexem/fc-gui 3.0.0-alpha.30 → 3.0.0-alpha.33
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 +16 -0
- package/bundles/@flexem/fc-gui.umd.js +31 -8
- 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 +7 -0
- package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
- package/elements/ring-graph/ring-graph-element.js +13 -4
- package/elements/ring-graph/ring-graph-element.metadata.json +1 -1
- package/model/historical-curve/historical-curve-axis-settings.d.ts +7 -0
- package/model/historical-curve/historical-curve-axis-settings.js +5 -0
- package/model/historical-curve/historical-curve-axis-settings.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -40,9 +40,9 @@ export class AirQualityElement extends ConditionalDisplayElement {
|
|
|
40
40
|
this.buildBackgroudRect(airQualitySvg, backgroundColor);
|
|
41
41
|
this.buildLocGroup(airQualitySvg, airQuality.city, fontColor);
|
|
42
42
|
this.buildAirQualityText(airQualitySvg, 130, 55, airQuality.aqi, fontColor, 53);
|
|
43
|
-
this.buildAirQualityText(airQualitySvg,
|
|
43
|
+
this.buildAirQualityText(airQualitySvg, 220, 28, '空气质量', fontColor);
|
|
44
44
|
this.buildRectBackgroundForAqi(airQualitySvg, airQuality.level);
|
|
45
|
-
this.buildAirQualityText(airQualitySvg,
|
|
45
|
+
this.buildAirQualityText(airQualitySvg, 220, 49, airQuality.category, fontColor);
|
|
46
46
|
this.buildAirQualityText(airQualitySvg, 30, 75, 'PM2.5', fontColor, 12, 0.8);
|
|
47
47
|
this.buildAirQualityText(airQualitySvg, 30, 95, airQuality.pm25, fontColor, 15);
|
|
48
48
|
this.buildAirQualityText(airQualitySvg, 80, 75, 'PM10', fontColor, 12, 0.8);
|
|
@@ -105,7 +105,7 @@ export class AirQualityElement extends ConditionalDisplayElement {
|
|
|
105
105
|
backgroundColor = '#A10E0E';
|
|
106
106
|
}
|
|
107
107
|
airQualitySvg.append('rect')
|
|
108
|
-
.attr('x', '
|
|
108
|
+
.attr('x', '195')
|
|
109
109
|
.attr('y', '35')
|
|
110
110
|
.attr('rx', '5')
|
|
111
111
|
.attr('width', '50')
|
|
@@ -10,6 +10,7 @@ import { HistoricalCurveElementStatus } from './historical-curve-element-status'
|
|
|
10
10
|
import { LOGGER_SERVICE_TOKEN } from '../../logger';
|
|
11
11
|
import { GlobalSettings, DisplayMode } from '../../settings';
|
|
12
12
|
import { CurveType } from '../../model/historical-curve/curve-type';
|
|
13
|
+
import { AxisRangeType } from '../../model/historical-curve/historical-curve-axis-settings';
|
|
13
14
|
export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
14
15
|
constructor(element, injector, permissionChecker, variableCommunicator, variableStore, historyDataStore, signalRAppId) {
|
|
15
16
|
super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
|
|
@@ -152,6 +153,9 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
152
153
|
const chart = nv.models.lineChart().showLegend(true)
|
|
153
154
|
.margin({ top: 0, bottom: 0, left: this.displayOption.marginLeft, right: this.displayOption.marginRight })
|
|
154
155
|
.noData(this.localization.chartNoData);
|
|
156
|
+
if (this.model.displaySetting.axisSetting.yAxisRangeType === AxisRangeType.Custom) {
|
|
157
|
+
chart.yDomain([this.model.displaySetting.axisSetting.yAxisMin, this.model.displaySetting.axisSetting.yAxisMax]);
|
|
158
|
+
}
|
|
155
159
|
if (!this.isMobileMode) {
|
|
156
160
|
chart.focusEnable(true);
|
|
157
161
|
chart.focus.margin({ top: 10, right: 0, bottom: 0, left: 0 });
|
|
@@ -176,6 +180,9 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
176
180
|
chart.multibar.stacked(true);
|
|
177
181
|
chart.multibar2.stacked(true);
|
|
178
182
|
}
|
|
183
|
+
if (this.model.displaySetting.axisSetting.yAxisRangeType === AxisRangeType.Custom) {
|
|
184
|
+
chart.yDomain([this.model.displaySetting.axisSetting.yAxisMin, this.model.displaySetting.axisSetting.yAxisMax]);
|
|
185
|
+
}
|
|
179
186
|
if (!this.isMobileMode) {
|
|
180
187
|
chart.focusEnable(true);
|
|
181
188
|
chart.focusShowAxisX(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":21,"character":44},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":63,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":64,"character":18},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":65,"character":27},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":66,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":67,"character":23},{"__symbolic":"reference","module":"../../config","name":"HistoryDataStore","line":68,"character":43},{"__symbolic":"reference","name":"string"}]}],"dispose":[{"__symbolic":"method"}],"getValidTimePeriods":[{"__symbolic":"method"}],"updateTimeRange":[{"__symbolic":"method"}],"updateQueryTimeRange":[{"__symbolic":"method"}],"reRenderElement":[{"__symbolic":"method"}],"renderElement":[{"__symbolic":"method"}],"renderChart":[{"__symbolic":"method"}],"getLineChart":[{"__symbolic":"method"}],"getMultiBarWithFocusChart":[{"__symbolic":"method"}],"renderCommonProperty":[{"__symbolic":"method"}],"renderOperationArea":[{"__symbolic":"method"}],"timeFormat":[{"__symbolic":"method"}],"loadFirstPage":[{"__symbolic":"method"}],"loadNextPage":[{"__symbolic":"method"}],"loadPreviousPage":[{"__symbolic":"method"}],"loadLastPage":[{"__symbolic":"method"}],"initElementStatus":[{"__symbolic":"method"}],"updateElementStatus":[{"__symbolic":"method"}],"setStatusAsUnbound":[{"__symbolic":"method"}],"setStatusAsLoading":[{"__symbolic":"method"}],"setStatusAsLoadFailed":[{"__symbolic":"method"}],"renderStatus":[{"__symbolic":"method"}],"clearStatus":[{"__symbolic":"method"}]}}}}]
|
|
@@ -30,6 +30,9 @@ export class RingGraphElement extends ReadableElement {
|
|
|
30
30
|
if (!this.model.variableId) {
|
|
31
31
|
return '';
|
|
32
32
|
}
|
|
33
|
+
if (!this.model.variableId.variableName || !this.model.variableId.variableName.name) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
33
36
|
const variable = new VariableDefinition(this.model.variableId.variableName.name, this.model.variableId.variableName.groupName, this.model.variableId.dataSourceCode, this.model.variableId.variableName.variableVersion);
|
|
34
37
|
return VariableUtil.getConvertedVariableName(this.variableStore, variable);
|
|
35
38
|
}
|
|
@@ -37,14 +40,20 @@ export class RingGraphElement extends ReadableElement {
|
|
|
37
40
|
if (!this.model.minValueType) {
|
|
38
41
|
return undefined;
|
|
39
42
|
}
|
|
40
|
-
|
|
43
|
+
if (!this.model.minVariable || !this.model.minVariable.name) {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
const variable = new VariableDefinition(this.model.minVariable.name, this.model.minVariable.groupName, this.model.minVariable.dataSourceCode, this.model.minVariable.variableVersion);
|
|
41
47
|
return VariableUtil.getConvertedVariableName(this.variableStore, variable);
|
|
42
48
|
}
|
|
43
49
|
get maxVariableName() {
|
|
44
50
|
if (!this.model.maxValueType) {
|
|
45
51
|
return undefined;
|
|
46
52
|
}
|
|
47
|
-
|
|
53
|
+
if (!this.model.maxVariable || !this.model.maxVariable.name) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
const variable = new VariableDefinition(this.model.maxVariable.name, this.model.maxVariable.groupName, this.model.maxVariable.dataSourceCode, this.model.maxVariable.variableVersion);
|
|
48
57
|
return VariableUtil.getConvertedVariableName(this.variableStore, variable);
|
|
49
58
|
}
|
|
50
59
|
initFrameNode() {
|
|
@@ -71,11 +80,11 @@ export class RingGraphElement extends ReadableElement {
|
|
|
71
80
|
this.isNeedUpdateScale = false;
|
|
72
81
|
this.valueObj.value = value;
|
|
73
82
|
}
|
|
74
|
-
if (((_b = this.model.minVariable) === null || _b === void 0 ? void 0 : _b.
|
|
83
|
+
if (((_b = this.model.minVariable) === null || _b === void 0 ? void 0 : _b.name) === variableName) {
|
|
75
84
|
this.isNeedUpdateScale = true;
|
|
76
85
|
this.valueObj.min = value;
|
|
77
86
|
}
|
|
78
|
-
if (((_c = this.model.maxVariable) === null || _c === void 0 ? void 0 : _c.
|
|
87
|
+
if (((_c = this.model.maxVariable) === null || _c === void 0 ? void 0 : _c.name) === variableName) {
|
|
79
88
|
this.isNeedUpdateScale = true;
|
|
80
89
|
this.valueObj.max = value;
|
|
81
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"RingGraphElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/readable-element","name":"ReadableElement","line":16,"character":38},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"RingGraphElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/readable-element","name":"ReadableElement","line":16,"character":38},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":60,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":60,"character":57},{"__symbolic":"reference","module":"../../communication/variable/variable-communicator","name":"VariableCommunicator","line":61,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":62,"character":23},{"__symbolic":"reference","module":"../../localization/localization.service","name":"Localization","line":63,"character":22},{"__symbolic":"reference","name":"string"}]}],"initFrameNode":[{"__symbolic":"method"}],"init":[{"__symbolic":"method"}],"updateValueObj":[{"__symbolic":"method"}],"updateScale":[{"__symbolic":"method"}],"updateVariableValue":[{"__symbolic":"method"}],"updateBar":[{"__symbolic":"method"}],"getBarColor":[{"__symbolic":"method"}],"drawClockWiseArc":[{"__symbolic":"method"}],"drawAntiClockWiseArc":[{"__symbolic":"method"}]},"statics":{"DEFAULT_MIN_VALUE":0,"DEFAULT_MAX_VALUE":100}}}}]
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { Font } from '../shared/text/font';
|
|
2
2
|
export interface HistoricalCurveAxisSettings {
|
|
3
|
+
readonly yAxisRangeType: AxisRangeType;
|
|
4
|
+
readonly yAxisMax?: number;
|
|
5
|
+
readonly yAxisMin?: number;
|
|
3
6
|
readonly axisColor: string;
|
|
4
7
|
readonly showAxisLabel: boolean;
|
|
5
8
|
readonly axisLabelFont: Font;
|
|
6
9
|
}
|
|
10
|
+
export declare enum AxisRangeType {
|
|
11
|
+
Auto = 0,
|
|
12
|
+
Custom = 1
|
|
13
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveAxisSettings":{"__symbolic":"interface"}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveAxisSettings":{"__symbolic":"interface"},"AxisRangeType":{"Auto":0,"Custom":1}}}]
|