|
|
|
@ -286,7 +286,8 @@ export class RangeChartWidgetComponent implements OnInit, OnDestroy, AfterViewIn |
|
|
|
this.rangeChart.setOption({ |
|
|
|
xAxis: { |
|
|
|
min: this.ctx.defaultSubscription.timeWindow.minTime, |
|
|
|
max: this.ctx.defaultSubscription.timeWindow.maxTime |
|
|
|
max: this.ctx.defaultSubscription.timeWindow.maxTime, |
|
|
|
tbTimeWindow: this.ctx.defaultSubscription.timeWindow |
|
|
|
}, |
|
|
|
series: [ |
|
|
|
{data: this.ctx.data?.length ? toNamedData(this.ctx.data[0].data) : []} |
|
|
|
@ -315,7 +316,19 @@ export class RangeChartWidgetComponent implements OnInit, OnDestroy, AfterViewIn |
|
|
|
}); |
|
|
|
this.rangeChartOptions = { |
|
|
|
tooltip: { |
|
|
|
trigger: 'none' |
|
|
|
trigger: 'axis', |
|
|
|
confine: true, |
|
|
|
appendToBody: true, |
|
|
|
axisPointer: { |
|
|
|
type: 'shadow' |
|
|
|
}, |
|
|
|
formatter: (params: CallbackDataParams[]) => |
|
|
|
this.settings.showTooltip ? echartsTooltipFormatter(this.renderer, this.tooltipDateFormat, |
|
|
|
this.settings, params, this.decimals, this.units, 0) : undefined, |
|
|
|
padding: [8, 12], |
|
|
|
backgroundColor: this.settings.tooltipBackgroundColor, |
|
|
|
borderWidth: 0, |
|
|
|
extraCssText: `line-height: 1; backdrop-filter: blur(${this.settings.tooltipBackgroundBlur}px);` |
|
|
|
}, |
|
|
|
grid: { |
|
|
|
containLabel: true, |
|
|
|
@ -403,19 +416,7 @@ export class RangeChartWidgetComponent implements OnInit, OnDestroy, AfterViewIn |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
if (this.settings.showTooltip) { |
|
|
|
this.rangeChartOptions.tooltip = { |
|
|
|
trigger: 'axis', |
|
|
|
confine: true, |
|
|
|
appendToBody: true, |
|
|
|
formatter: (params: CallbackDataParams[]) => echartsTooltipFormatter(this.renderer, this.tooltipDateFormat, |
|
|
|
this.settings, params, this.decimals, this.units, 0), |
|
|
|
padding: [8, 12], |
|
|
|
backgroundColor: this.settings.tooltipBackgroundColor, |
|
|
|
borderWidth: 0, |
|
|
|
extraCssText: `line-height: 1; backdrop-filter: blur(${this.settings.tooltipBackgroundBlur}px);` |
|
|
|
}; |
|
|
|
} |
|
|
|
(this.rangeChartOptions.xAxis as any).tbTimeWindow = this.ctx.defaultSubscription.timeWindow; |
|
|
|
|
|
|
|
this.rangeChart.setOption(this.rangeChartOptions); |
|
|
|
|
|
|
|
|