fix: 修复富文本图表不识别记录数字段问题

This commit is contained in:
wangjiahao 2023-11-17 17:48:50 +08:00
parent d25b9ac0dd
commit 1651f5413a

View File

@ -335,7 +335,6 @@ const calcData = (view: Chart, callback) => {
}
const initCurFields = chartDetails => {
curFields.value = []
dataRowFiledName.value = []
dataRowSelect.value = {}
dataRowNameSelect.value = {}
@ -347,10 +346,12 @@ const initCurFields = chartDetails => {
JSON.stringify(chartDetails.yAxisExt)
chartDetails.data.sourceFields.forEach(field => {
if (checkAllAxisStr.indexOf(field.id) > -1) {
curFields.value.push(field)
dataRowFiledName.value.push(`[${field.name}]`)
}
})
if (checkAllAxisStr.indexOf('"记录数*"') > -1) {
dataRowFiledName.value.push(`[记录数*]`)
}
// Get the corresponding relationship between id and value
const nameIdMap = chartDetails.data.fields.reduce((pre, next) => {
pre[next['dataeaseName']] = next['id']