Fixed abnormal message rendering caused by abnormal value of indicator name field, Supplement for PR #2030 (#2031)
Some checks are pending
supersonic CentOS CI / build (21) (push) Waiting to run
supersonic mac CI / build (21) (push) Waiting to run
supersonic ubuntu CI / build (21) (push) Waiting to run
supersonic windows CI / build (21) (push) Waiting to run

This commit is contained in:
jianjun.xu
2025-02-07 10:18:52 +08:00
committed by GitHub
parent fd306db3fe
commit 4ab9cd715d
6 changed files with 9 additions and 9 deletions

View File

@@ -51,7 +51,7 @@ const MetricTrendChart: React.FC<Props> = ({
instanceObj.clear();
}
const valueColumnName = metricField.nameEn;
const valueColumnName = metricField.bizName;
const dataSource = resultList.map((item: any) => {
return {
...item,

View File

@@ -121,7 +121,7 @@ const MultiMetricsTrendChart: React.FC<Props> = ({
showSymbol: resultList.length === 1,
smooth: true,
data: resultList.map((item: any) => {
const value = item[metricField.nameEn];
const value = item[metricField.bizName];
return (metricField.dataFormatType === 'percent' ||
metricField.dataFormatType === 'decimal') &&
metricField.dataFormat?.needMultiply100

View File

@@ -51,7 +51,7 @@ const MetricTrend: React.FC<Props> = ({
const dateField: any = queryColumns?.find(
(column: any) => column.showType === 'DATE' || column.type === 'DATE'
);
const dateColumnName = dateField?.nameEn || '';
const dateColumnName = dateField?.bizName || '';
const categoryColumnName =
queryColumns?.find((column: any) => column.showType === 'CATEGORY')?.bizName || '';
const metricFields = queryColumns?.filter((column: any) => column.showType === 'NUMBER');