forked from github/dataease
fix(图表): 日期下钻显示路径错误
This commit is contained in:
parent
74e54c7b93
commit
ebef25efb5
@ -137,6 +137,12 @@ public class DefaultChartHandler extends AbstractChartPlugin {
|
||||
|
||||
Map<String, Object> mapTableNormal = ChartDataBuild.transTableNormal(xAxis, yAxis, view, calcResult.getOriginData(), extStack, desensitizationList);
|
||||
var drillFilters = filterResult.getFilterList().stream().filter(f -> f.getFilterType() == 1).collect(Collectors.toList());
|
||||
// 日期下钻替换回去
|
||||
drillFilters.forEach(f -> {
|
||||
if (CollectionUtils.isNotEmpty(f.getOriginValue())) {
|
||||
f.setValue(f.getOriginValue());
|
||||
}
|
||||
});
|
||||
var isDrill = CollectionUtils.isNotEmpty(drillFilters);
|
||||
// 构建结果
|
||||
Map<String, Object> dataMap = new HashMap<>();
|
||||
|
@ -281,6 +281,7 @@ public class ChartDataManage {
|
||||
drillFilter.setFilterType(1);
|
||||
if (datasetTableField.getDeType() == 1) {
|
||||
drillFilter.setOperator("between");
|
||||
drillFilter.setOriginValue(Collections.singletonList(dim.getValue()));
|
||||
// 把value类似过滤组件处理,获得start time和end time
|
||||
Map<String, Long> stringLongMap = Utils.parseDateTimeValue(dim.getValue());
|
||||
drillFilter.setValue(Arrays.asList(String.valueOf(stringLongMap.get("startTime")), String.valueOf(stringLongMap.get("endTime"))));
|
||||
|
Loading…
Reference in New Issue
Block a user