@flexem/fc-gui 3.0.0-alpha.35 → 3.0.0-alpha.36
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 +1 -6
- package/bundles/@flexem/fc-gui.umd.js +37 -5
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/elements/historical-curve/historical-curve.element.js +37 -5
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
22
22
|
marginRight: 20,
|
|
23
23
|
mobileMinWidth: 450,
|
|
24
24
|
operationAreaHeight: 32,
|
|
25
|
-
operationAreaMarginTop:
|
|
25
|
+
operationAreaMarginTop: 25,
|
|
26
26
|
operationSelectFontSize: '16px',
|
|
27
27
|
operationButtonWidth: 24,
|
|
28
28
|
operationButtonHeight: 24,
|
|
@@ -39,7 +39,7 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
39
39
|
}, this.model.displaySetting.refreshInterval * 1000);
|
|
40
40
|
this.isMobileMode = DisplayMode.Mobile === injector.get(GlobalSettings).displayMode;
|
|
41
41
|
if (this.isMobileMode) {
|
|
42
|
-
this.displayOption.operationAreaMarginTop =
|
|
42
|
+
this.displayOption.operationAreaMarginTop = 35;
|
|
43
43
|
if (this.model.displaySetting.size.width >= this.displayOption.mobileMinWidth) {
|
|
44
44
|
this.displayOption.operationAreaHeight = 68;
|
|
45
45
|
this.displayOption.operationSelectFontSize = '24px';
|
|
@@ -206,7 +206,7 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
206
206
|
chart.tooltip.headerFormatter(d => this.timeFormat(d, '%x %X'));
|
|
207
207
|
if (this.model.displaySetting.showAxis) {
|
|
208
208
|
chart.xAxis.showMaxMin(true).tickFormat(d => {
|
|
209
|
-
if (this.currentTimePeriod
|
|
209
|
+
if (this.currentTimePeriod === 3 || this.currentTimePeriod === 4 || this.currentTimePeriod === 5) {
|
|
210
210
|
return this.timeFormat(d, '%y-%m-%d');
|
|
211
211
|
}
|
|
212
212
|
return this.timeFormat(Number(d), '%X');
|
|
@@ -258,7 +258,7 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
258
258
|
.attr('class', 'full-date')
|
|
259
259
|
.attr('x', 0)
|
|
260
260
|
.attr('y', 0)
|
|
261
|
-
.attr('dy', '2.
|
|
261
|
+
.attr('dy', '2.3em')
|
|
262
262
|
.style('text-anchor', 'middle')
|
|
263
263
|
.style('font-size', fontSize)
|
|
264
264
|
.text((d) => d);
|
|
@@ -273,10 +273,42 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
|
|
|
273
273
|
.attr('class', 'full-date')
|
|
274
274
|
.attr('x', 0)
|
|
275
275
|
.attr('y', 0)
|
|
276
|
-
.attr('dy', '2.
|
|
276
|
+
.attr('dy', '2.3em')
|
|
277
277
|
.style('text-anchor', 'middle')
|
|
278
278
|
.style('font-size', fontSize)
|
|
279
279
|
.text((d) => d);
|
|
280
|
+
const h = this.rootElement
|
|
281
|
+
.selectAll('.nv-focusWrap')
|
|
282
|
+
.attr('transform')
|
|
283
|
+
.slice(0, -1)
|
|
284
|
+
.split(',')[1];
|
|
285
|
+
this.rootElement
|
|
286
|
+
.selectAll('.nv-focusWrap')
|
|
287
|
+
.attr('transform', `translate(0,${Number(h) + 15})`);
|
|
288
|
+
const resizeObserver = new window.MutationObserver(() => {
|
|
289
|
+
this.rootElement
|
|
290
|
+
.selectAll('.nv-x')
|
|
291
|
+
.selectAll('.tick')
|
|
292
|
+
.selectAll('.full-date')
|
|
293
|
+
.remove();
|
|
294
|
+
this.rootElement
|
|
295
|
+
.selectAll('.nv-x')
|
|
296
|
+
.selectAll('.tick')
|
|
297
|
+
.selectAll('text')
|
|
298
|
+
.data(function (d) {
|
|
299
|
+
return [self.timeFormat(Number(d), '%y-%m-%d'), self.timeFormat(Number(d), '%H:%M:%S')];
|
|
300
|
+
})
|
|
301
|
+
.enter()
|
|
302
|
+
.append('text')
|
|
303
|
+
.attr('class', 'full-date')
|
|
304
|
+
.attr('x', 0)
|
|
305
|
+
.attr('y', 0)
|
|
306
|
+
.attr('dy', '2.3em')
|
|
307
|
+
.style('text-anchor', 'middle')
|
|
308
|
+
.style('font-size', fontSize)
|
|
309
|
+
.text((d) => d);
|
|
310
|
+
});
|
|
311
|
+
resizeObserver.observe(document.getElementsByClassName('extent')[0], { attributes: true });
|
|
280
312
|
}
|
|
281
313
|
else {
|
|
282
314
|
this.rootElement
|