forked from github/dataease
fix(仪表板-散点图): 修复散点图提示显示值不正确的问题
This commit is contained in:
parent
0bcaee047c
commit
fda15198c7
@ -35,10 +35,11 @@ public class ScatterHandler extends YoyChartHandler {
|
||||
boolean isDrill = filterResult.getFilterList().stream().anyMatch(ele -> ele.getFilterType() == 1);
|
||||
var xAxis = formatResult.getAxisMap().get(ChartAxis.xAxis);
|
||||
var yAxis = formatResult.getAxisMap().get(ChartAxis.yAxis);
|
||||
var yAxisTemp = new ArrayList<>(yAxis);
|
||||
var extBubble = formatResult.getAxisMap().get(ChartAxis.extBubble);
|
||||
if (!extBubble.isEmpty()) {
|
||||
// 剔除气泡大小,移除一个
|
||||
Iterator<ChartViewFieldDTO> iterator = yAxis.iterator();
|
||||
Iterator<ChartViewFieldDTO> iterator = yAxisTemp.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
ChartViewFieldDTO obj = iterator.next();
|
||||
if (obj.getId().equals(extBubble.getFirst().getId())) {
|
||||
@ -47,7 +48,7 @@ public class ScatterHandler extends YoyChartHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
Map<String, Object> result = ChartDataBuild.transScatterDataAntV(xAxis, yAxis, view, data, extBubble, isDrill);
|
||||
Map<String, Object> result = ChartDataBuild.transScatterDataAntV(xAxis, yAxisTemp, view, data, extBubble, isDrill);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -437,11 +437,11 @@ public class ChartDataBuild {
|
||||
axisChartDataDTO.setValue(new BigDecimal(0));
|
||||
}
|
||||
axisChartDataDTO.setCategory(StringUtils.defaultIfBlank(yAxis.get(j).getChartShowName(), yAxis.get(j).getName()));
|
||||
buildDynamicValue(view, axisChartDataDTO, row, size, extSize);
|
||||
buildDynamicValue(view, axisChartDataDTO, row, size, ObjectUtils.isNotEmpty(extBubble)?extSize-1:extSize);
|
||||
// pop
|
||||
if (ObjectUtils.isNotEmpty(extBubble)) {
|
||||
try {
|
||||
axisChartDataDTO.setPopSize(StringUtils.isEmpty(row[size - extBubble.size()]) ? null : new BigDecimal(row[size - extBubble.size()]));
|
||||
axisChartDataDTO.setPopSize(StringUtils.isEmpty(row[2]) ? null : new BigDecimal(row[2]));
|
||||
ChartQuotaDTO bubbleQuotaDTO = new ChartQuotaDTO();
|
||||
bubbleQuotaDTO.setId(extBubble.get(0).getId());
|
||||
quotaList.add(bubbleQuotaDTO);
|
||||
|
Loading…
Reference in New Issue
Block a user