|
|
|
@ -47,7 +47,7 @@ import { |
|
|
|
import { forkJoin, Observable, of, ReplaySubject, Subject, throwError } from 'rxjs'; |
|
|
|
import { CancelAnimationFrame } from '@core/services/raf.service'; |
|
|
|
import { EntityType } from '@shared/models/entity-type.models'; |
|
|
|
import { createLabelFromDatasource, deepClone, isDefined, isEqual } from '@core/utils'; |
|
|
|
import { createLabelFromDatasource, deepClone, isDefined, isDefinedAndNotNull, isEqual } from '@core/utils'; |
|
|
|
import { EntityId } from '@app/shared/models/id/entity-id'; |
|
|
|
import * as moment_ from 'moment'; |
|
|
|
import { emptyPageData, PageData } from '@shared/models/page/page-data'; |
|
|
|
@ -1332,7 +1332,7 @@ export class WidgetSubscription implements IWidgetSubscription { |
|
|
|
|
|
|
|
private updateLegend(dataIndex: number, data: DataSet, detectChanges: boolean) { |
|
|
|
const dataKey = this.legendData.keys.find(key => key.dataIndex === dataIndex).dataKey; |
|
|
|
const decimals = isDefined(dataKey.decimals) ? dataKey.decimals : this.decimals; |
|
|
|
const decimals = isDefinedAndNotNull(dataKey.decimals) ? dataKey.decimals : this.decimals; |
|
|
|
const units = dataKey.units && dataKey.units.length ? dataKey.units : this.units; |
|
|
|
const legendKeyData = this.legendData.data[dataIndex]; |
|
|
|
if (this.legendConfig.showMin) { |
|
|
|
|