diff --git a/frontend/app/mstore/metricStore.ts b/frontend/app/mstore/metricStore.ts index 3ff0dbe97..366a6982b 100644 --- a/frontend/app/mstore/metricStore.ts +++ b/frontend/app/mstore/metricStore.ts @@ -101,6 +101,8 @@ export default class MetricStore { merge(obj: any, updateChangeFlag: boolean = true) { const type = obj.metricType; + console.log('iobj', obj) + // handle metricType change if (obj.hasOwnProperty('metricType') && type !== this.instance.metricType) { this.instance.series.forEach((s: any, i: number) => { @@ -109,6 +111,10 @@ export default class MetricStore { this.changeType(type); } + if (obj.hasOwnProperty('metricOf') && obj.metricOf !== this.instance.metricOf && (obj.metricOf === 'sessions' || obj.metricOf === 'jsErrors')) { + obj.viewType = 'table' + } + // handle metricValue change if (obj.hasOwnProperty('metricValue') && obj.metricValue !== this.instance.metricValue) { if (Array.isArray(obj.metricValue) && obj.metricValue.length > 1) {