|
|
|
@ -17,9 +17,7 @@ |
|
|
|
import { isFunction } from '@core/utils'; |
|
|
|
import { FormattedData } from '@shared/models/widget.models'; |
|
|
|
import { DateFormatProcessor, DateFormatSettings, Font } from '@shared/models/widget-settings.models'; |
|
|
|
import { |
|
|
|
TimeSeriesChartDataItem, |
|
|
|
} from '@home/components/widget/lib/chart/time-series-chart.models'; |
|
|
|
import { TimeSeriesChartDataItem } from '@home/components/widget/lib/chart/time-series-chart.models'; |
|
|
|
import { Renderer2, SecurityContext } from '@angular/core'; |
|
|
|
import { DomSanitizer } from '@angular/platform-browser'; |
|
|
|
import { CallbackDataParams } from 'echarts/types/dist/shared'; |
|
|
|
@ -104,6 +102,9 @@ export class TimeSeriesChartTooltip { |
|
|
|
if (!tooltipParams.items.length && !tooltipParams.comparisonItems.length) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
if (this.settings.tooltipHideZeroFalse && !tooltipParams.items.some(value => value.param.value[1] && value.param.value[1] !== 'false')) { |
|
|
|
return undefined; |
|
|
|
} |
|
|
|
|
|
|
|
const tooltipElement: HTMLElement = this.renderer.createElement('div'); |
|
|
|
this.renderer.setStyle(tooltipElement, 'display', 'flex'); |
|
|
|
@ -130,7 +131,7 @@ export class TimeSeriesChartTooltip { |
|
|
|
this.renderer.appendChild(tooltipItemsElement, this.constructTooltipDateElement(items[0].param, interval)); |
|
|
|
} |
|
|
|
for (const item of items) { |
|
|
|
if (!this.settings.tooltipHideZeroFalse || item.param.value[1]) { |
|
|
|
if (!this.settings.tooltipHideZeroFalse || (item.param.value[1] && item.param.value[1] !== 'false')) { |
|
|
|
this.renderer.appendChild(tooltipItemsElement, this.constructTooltipSeriesElement(item)); |
|
|
|
} |
|
|
|
} |
|
|
|
|