Commit 6603d6f1a4d380398140e71c4ac9f6eb7b562577

Authored by VoBa
Committed by GitHub
2 parents 169d12db 46487aa5

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
... ... @@ -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,
... ...