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