forked from github/dataease
feat(图表): 同环比增加具体数值选项
This commit is contained in:
parent
0f52f58b57
commit
c0eb3dbd26
@ -328,6 +328,8 @@ public class DefaultChartHandler extends AbstractChartPlugin {
|
||||
.setScale(8, RoundingMode.HALF_UP)
|
||||
.toString();
|
||||
}
|
||||
} else if (StringUtils.equalsIgnoreCase(resultData, "pre")) {
|
||||
item[dataIndex] = new BigDecimal(lastValue).toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1098,6 +1098,7 @@ export default {
|
||||
quarter_mom: '季环比',
|
||||
week_mom: '周环比',
|
||||
day_mom: '日环比',
|
||||
data_pre: '具体数值',
|
||||
data_sub: '对比差值',
|
||||
data_percent: '差值百分比',
|
||||
compare_calc_expression: '计算公式',
|
||||
|
@ -201,12 +201,14 @@ initDateFormatter()
|
||||
|
||||
<el-form-item :label="t('chart.compare_data')">
|
||||
<el-radio-group v-model="compareItem.compareCalc.resultData">
|
||||
<el-radio label="pre">{{ t('chart.data_pre') }}</el-radio>
|
||||
<el-radio label="sub">{{ t('chart.data_sub') }}</el-radio>
|
||||
<el-radio label="percent">{{ t('chart.data_percent') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('chart.compare_calc_expression')">
|
||||
<span v-if="compareItem.compareCalc.resultData === 'pre'" class="exp-style">上期数据</span>
|
||||
<span v-if="compareItem.compareCalc.resultData === 'sub'" class="exp-style"
|
||||
>本期数据 - 上期数据</span
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user