Browse Source
Merge pull request #3196 from ChantsovaEkaterina/bug/flot-attributes-usage-in-labels
[3.0] Flot: attributes usage in labels. Fix error on subscribing on attributes, that will be used in labels
pull/3230/head
VoBa
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
0 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.models.ts
-
ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts
|
|
|
@ -158,6 +158,7 @@ export interface TbFlotCustomLegendSettings { |
|
|
|
export interface TbFlotLabelPatternSettings { |
|
|
|
name: string; |
|
|
|
type: DataKeyType; |
|
|
|
settings?: any; |
|
|
|
} |
|
|
|
|
|
|
|
export interface TbFlotGraphSettings extends TbFlotBaseSettings, TbFlotThresholdsSettings, TbFlotComparisonSettings, TbFlotCustomLegendSettings { |
|
|
|
|
|
|
|
@ -383,6 +383,9 @@ export class TbFlot { |
|
|
|
if (this.settings.customLegendEnabled) { |
|
|
|
this.labelPatternsSourcesData = []; |
|
|
|
const labelPatternsDatasources: Datasource[] = []; |
|
|
|
this.settings.dataKeysListForLabels.forEach((item) => { |
|
|
|
item.settings = {}; |
|
|
|
}); |
|
|
|
subscription.datasources.forEach((item) => { |
|
|
|
let datasource: Datasource = { |
|
|
|
type: item.type, |
|
|
|
|