Browse Source

Fix error on subscribing on attributes, that will be used in labels

pull/3196/head
Chantsova Ekaterina 6 years ago
parent
commit
51462e8017
  1. 1
      ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.models.ts
  2. 5
      ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.ts

1
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 {

5
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,

Loading…
Cancel
Save