forked from github/dataease
feat(视图): 柱状图、折线图支持结果隐藏空数据
This commit is contained in:
parent
61ad36d2bb
commit
f216b25c7b
@ -927,7 +927,9 @@ public class ChartViewService {
|
|||||||
PageInfo pageInfo = new PageInfo();
|
PageInfo pageInfo = new PageInfo();
|
||||||
pageInfo.setGoPage(chartExtRequest.getGoPage());
|
pageInfo.setGoPage(chartExtRequest.getGoPage());
|
||||||
if (StringUtils.equalsIgnoreCase(view.getResultMode(), "custom")) {
|
if (StringUtils.equalsIgnoreCase(view.getResultMode(), "custom")) {
|
||||||
pageInfo.setPageSize(Math.min(view.getResultCount() - (chartExtRequest.getGoPage() - 1) * chartExtRequest.getPageSize(), chartExtRequest.getPageSize()));
|
if (StringUtils.equalsIgnoreCase(view.getType(), "table-info") && table.getMode() == 0) {
|
||||||
|
pageInfo.setPageSize(Math.min(view.getResultCount() - (chartExtRequest.getGoPage() - 1) * chartExtRequest.getPageSize(), chartExtRequest.getPageSize()));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
pageInfo.setPageSize(chartExtRequest.getPageSize());
|
pageInfo.setPageSize(chartExtRequest.getPageSize());
|
||||||
}
|
}
|
||||||
|
@ -371,7 +371,7 @@ export function getTooltip(chart) {
|
|||||||
} else {
|
} else {
|
||||||
res = param.value
|
res = param.value
|
||||||
}
|
}
|
||||||
obj.value = res
|
obj.value = res === null ? '' : res
|
||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,9 @@ export const formatterType = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export function valueFormatter(value, formatter) {
|
export function valueFormatter(value, formatter) {
|
||||||
|
if (value === null || value === undefined) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
// 1.unit 2.decimal 3.thousand separator and suffix
|
// 1.unit 2.decimal 3.thousand separator and suffix
|
||||||
let result
|
let result
|
||||||
if (formatter.type === 'auto') {
|
if (formatter.type === 'auto') {
|
||||||
|
@ -76,11 +76,8 @@
|
|||||||
v-model="functionForm.emptyDataStrategy"
|
v-model="functionForm.emptyDataStrategy"
|
||||||
@change="changeFunctionCfg"
|
@change="changeFunctionCfg"
|
||||||
>
|
>
|
||||||
<el-radio :label="'breakLine'">{{ chart.type.includes('bar')?$t('chart.set_zero'):$t('chart.break_line') }}</el-radio>
|
<el-radio :label="'breakLine'">{{ $t('chart.break_line') }}</el-radio>
|
||||||
<el-radio
|
<el-radio :label="'setZero'">{{ $t('chart.set_zero') }}</el-radio>
|
||||||
v-if="chart.type.includes('line') || chart.type.includes('area')"
|
|
||||||
:label="'setZero'"
|
|
||||||
>{{ $t('chart.set_zero') }}</el-radio>
|
|
||||||
<el-radio :label="'ignoreData'">{{ $t('chart.ignore_data') }}</el-radio>
|
<el-radio :label="'ignoreData'">{{ $t('chart.ignore_data') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
Loading…
Reference in New Issue
Block a user