diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.models.ts index 5afdcf2305..5a1c921f88 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.models.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.models.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 { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts b/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts index 1d00ee307e..1a6c85a320 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts @@ -42,7 +42,7 @@ import { flotSettingsSchema, TbFlotAxisOptions, TbFlotHoverInfo, - TbFlotKeySettings, + TbFlotKeySettings, TbFlotLabelPatternSettings, TbFlotPlotAxis, TbFlotPlotDataSeries, TbFlotPlotItem, @@ -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,