Browse Source
Merge pull request #4578 from ChantsovaEkaterina/bug/flot-thresholds-appearing
UI: Flot widget, fix thresholds appearing when threshold attribute is not set
pull/4649/head
Igor Kulikov
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts
|
|
|
@ -24,6 +24,7 @@ import { |
|
|
|
isDefinedAndNotNull, |
|
|
|
isEqual, |
|
|
|
isNumber, |
|
|
|
isNumeric, |
|
|
|
isUndefined |
|
|
|
} from '@app/core/utils'; |
|
|
|
import { IWidgetSubscription, WidgetSubscriptionOptions } from '@core/api/widget-api.models'; |
|
|
|
@ -841,7 +842,7 @@ export class TbFlot { |
|
|
|
data.forEach((keyData) => { |
|
|
|
if (keyData && keyData.data && keyData.data[0]) { |
|
|
|
const attrValue = keyData.data[0][1]; |
|
|
|
if (isFinite(attrValue)) { |
|
|
|
if (isNumeric(attrValue) && isFinite(attrValue)) { |
|
|
|
const settings: TbFlotThresholdKeySettings = keyData.dataKey.settings; |
|
|
|
const colorIndex = this.subscription.data.length + allThresholds.length; |
|
|
|
this.generateThreshold(allThresholds, settings.yaxis, settings.lineWidth, settings.color, colorIndex, attrValue); |
|
|
|
|