Commit 6603d6f1a4d380398140e71c4ac9f6eb7b562577
Committed by
GitHub
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
Showing
2 changed files
with
4 additions
and
0 deletions
... | ... | @@ -158,6 +158,7 @@ export interface TbFlotCustomLegendSettings { |
158 | 158 | export interface TbFlotLabelPatternSettings { |
159 | 159 | name: string; |
160 | 160 | type: DataKeyType; |
161 | + settings?: any; | |
161 | 162 | } |
162 | 163 | |
163 | 164 | export interface TbFlotGraphSettings extends TbFlotBaseSettings, TbFlotThresholdsSettings, TbFlotComparisonSettings, TbFlotCustomLegendSettings { | ... | ... |
... | ... | @@ -383,6 +383,9 @@ export class TbFlot { |
383 | 383 | if (this.settings.customLegendEnabled) { |
384 | 384 | this.labelPatternsSourcesData = []; |
385 | 385 | const labelPatternsDatasources: Datasource[] = []; |
386 | + this.settings.dataKeysListForLabels.forEach((item) => { | |
387 | + item.settings = {}; | |
388 | + }); | |
386 | 389 | subscription.datasources.forEach((item) => { |
387 | 390 | let datasource: Datasource = { |
388 | 391 | type: item.type, | ... | ... |