Commit 51462e80179db938eef0cbb77ea5516ee4d6d626

Authored by Chantsova Ekaterina
1 parent 169d12db

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 {
... ...
... ... @@ -42,7 +42,7 @@ import {
42 42 flotSettingsSchema,
43 43 TbFlotAxisOptions,
44 44 TbFlotHoverInfo,
45   - TbFlotKeySettings,
  45 + TbFlotKeySettings, TbFlotLabelPatternSettings,
46 46 TbFlotPlotAxis,
47 47 TbFlotPlotDataSeries,
48 48 TbFlotPlotItem,
... ... @@ -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,
... ...