Merge pull request #10742 from dataease/pr@dev-v2@chart-scatter-tooltip-fix
fix(仪表板-散点图): 修复散点图提示显示值不正确的问题
This commit is contained in:
commit
e9912b213f
@ -35,10 +35,11 @@ public class ScatterHandler extends YoyChartHandler {
|
|||||||
boolean isDrill = filterResult.getFilterList().stream().anyMatch(ele -> ele.getFilterType() == 1);
|
boolean isDrill = filterResult.getFilterList().stream().anyMatch(ele -> ele.getFilterType() == 1);
|
||||||
var xAxis = formatResult.getAxisMap().get(ChartAxis.xAxis);
|
var xAxis = formatResult.getAxisMap().get(ChartAxis.xAxis);
|
||||||
var yAxis = formatResult.getAxisMap().get(ChartAxis.yAxis);
|
var yAxis = formatResult.getAxisMap().get(ChartAxis.yAxis);
|
||||||
|
var yAxisTemp = new ArrayList<>(yAxis);
|
||||||
var extBubble = formatResult.getAxisMap().get(ChartAxis.extBubble);
|
var extBubble = formatResult.getAxisMap().get(ChartAxis.extBubble);
|
||||||
if (!extBubble.isEmpty()) {
|
if (!extBubble.isEmpty()) {
|
||||||
// 剔除气泡大小,移除一个
|
// 剔除气泡大小,移除一个
|
||||||
Iterator<ChartViewFieldDTO> iterator = yAxis.iterator();
|
Iterator<ChartViewFieldDTO> iterator = yAxisTemp.iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
ChartViewFieldDTO obj = iterator.next();
|
ChartViewFieldDTO obj = iterator.next();
|
||||||
if (obj.getId().equals(extBubble.getFirst().getId())) {
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -437,11 +437,11 @@ public class ChartDataBuild {
|
|||||||
axisChartDataDTO.setValue(new BigDecimal(0));
|
axisChartDataDTO.setValue(new BigDecimal(0));
|
||||||
}
|
}
|
||||||
axisChartDataDTO.setCategory(StringUtils.defaultIfBlank(yAxis.get(j).getChartShowName(), yAxis.get(j).getName()));
|
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
|
// pop
|
||||||
if (ObjectUtils.isNotEmpty(extBubble)) {
|
if (ObjectUtils.isNotEmpty(extBubble)) {
|
||||||
try {
|
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();
|
ChartQuotaDTO bubbleQuotaDTO = new ChartQuotaDTO();
|
||||||
bubbleQuotaDTO.setId(extBubble.get(0).getId());
|
bubbleQuotaDTO.setId(extBubble.get(0).getId());
|
||||||
quotaList.add(bubbleQuotaDTO);
|
quotaList.add(bubbleQuotaDTO);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user