Merge pull request #9191 from ulleo/dev-v2

fix(图表): 修复双轴图动态值辅助线不生效问题
This commit is contained in:
ulleo 2024-04-18 14:27:44 +08:00 committed by GitHub
commit 3c1ca7702d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 3 deletions

View File

@ -865,7 +865,7 @@ public class ChartDataManage {
return list;
}
var assistLineCfg = JsonUtil.parseObject((String) JsonUtil.toJSONString(senior.get("assistLineCfg")), ChartSeniorAssistCfgDTO.class);
ChartSeniorAssistCfgDTO assistLineCfg = JsonUtil.parseObject((String) JsonUtil.toJSONString(senior.get("assistLineCfg")), ChartSeniorAssistCfgDTO.class);
if (null == assistLineCfg || !assistLineCfg.isEnable()) {
return list;
}

View File

@ -76,8 +76,23 @@ const init = () => {
state.lineArr = JSON.parse(JSON.stringify(props.line))
state.lineArr.forEach(line => {
if (find(props.quotaFields, d => d.id === line.fieldId) == undefined) {
line.fieldId = undefined
if (props.useQuotaExt) {
if (
line.yAxisType === 'left' &&
find(props.quotaFields, d => d.id === line.fieldId) == undefined
) {
line.fieldId = undefined
}
if (
line.yAxisType === 'right' &&
find(props.quotaExtFields, d => d.id === line.fieldId) == undefined
) {
line.fieldId = undefined
}
} else {
if (find(props.quotaFields, d => d.id === line.fieldId) == undefined) {
line.fieldId = undefined
}
}
})

View File

@ -1,5 +1,6 @@
package io.dataease.api.chart.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
@ -15,6 +16,7 @@ public class ChartSeniorAssistDTO {
private Long fieldId;
private String summary;
private String axis;
@JsonProperty("yAxisType")
private String yAxisType;
private String value;
private String lineType;