diff --git a/ui-ngx/src/app/core/api/widget-subscription.ts b/ui-ngx/src/app/core/api/widget-subscription.ts index bb594f0802..9d046bbf83 100644 --- a/ui-ngx/src/app/core/api/widget-subscription.ts +++ b/ui-ngx/src/app/core/api/widget-subscription.ts @@ -1277,7 +1277,7 @@ export class WidgetSubscription implements IWidgetSubscription { const index = startIndex + dataIndex * dataKeysCount + dataKeyIndex; let update = true; let currentData: DataSetHolder; - if (this.displayLegend && this.legendData.keys[index].dataKey.hidden) { + if (this.displayLegend && this.legendData.keys.find(key => key.dataIndex === index).dataKey.hidden) { currentData = this.hiddenData[index]; } else { currentData = this.data[index];