修改
This commit is contained in:
@@ -125,7 +125,7 @@ export default {
|
||||
// 重构 chartD:替换硬编码数据为动态解析数据
|
||||
chartD() {
|
||||
// 获取动态解析的趋势数据
|
||||
const { months, rates, reals, targets, flags } = this.trendParsedData;
|
||||
const { months, rates, reals, targets, flags,diffs } = this.trendParsedData;
|
||||
// 销量场景数据(保留原有结构,替换数据来源)
|
||||
const salesData = {
|
||||
allPlaceNames: months, // 优先用基地名称,无则用月份
|
||||
@@ -191,7 +191,7 @@ export default {
|
||||
height: 20,
|
||||
// 关键:去掉换行,让文字在一行显示,适配小尺寸
|
||||
formatter: function (params) {
|
||||
const diff = data.diffs || [];
|
||||
const diff = diffs || [];
|
||||
const currentDiff = diff[params.dataIndex] || 0;
|
||||
return `{rate|${currentDiff}}{text|差值}`;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user