Commit 4e80cc33 by chenwq

折线图,小数点

1 parent 64c348e7
......@@ -139,7 +139,8 @@ export default {
// 移除图表
this[this.domId].on('globalout', () => {
this.chartAction()
this.getRankList(this.dataList.length - 1, this.rankFlag + 'List')
this.moveAttr.dataIndex = this.dataList.length - 1
this.getRankList(this.moveAttr.dataIndex, this.rankFlag + 'List')
})
},
chartAction(type) {
......@@ -166,10 +167,12 @@ export default {
this[this.domId].setOption(this.lineOptions)
// 默认展示tooltip
this.chartAction()
this.getRankList(this.dataList.length - 1)
this.moveAttr.dataIndex = this.dataList.length - 1
this.getRankList(this.moveAttr.dataIndex)
},
handleRankChange(value) {
this.rankFlag = value
this.moveAttr.dataIndex = this.dataList.length - 1
this.getRankList(this.moveAttr.dataIndex, this.rankFlag + 'List')
}
}
......
......@@ -127,7 +127,7 @@ export default {
})
this.dataList.push({
num: item.num || 0,
rate: item.rate.toFixed(4) || 0,
rate: item.rate.toFixed(2) || 0,
hrate: item.hrate.toFixed(4) || 0,
trate: item.trate.toFixed(4) || 0,
statDate: item.statDate,
......
......@@ -119,7 +119,7 @@ export default {
})
this.dataList.push({
num: item.num || 0,
rate: item.rate.toFixed(4) || 0,
rate: item.rate.toFixed(2) || 0,
hrate: item.hrate.toFixed(4) || 0,
trate: item.trate.toFixed(4) || 0,
statDate: item.statDate,
......
......@@ -119,7 +119,7 @@ export default {
})
this.dataList.push({
num: item.num || 0,
rate: item.rate.toFixed(4) || 0,
rate: item.rate.toFixed(2) || 0,
hrate: item.hrate.toFixed(4) || 0,
trate: item.trate.toFixed(4) || 0,
statDate: item.statDate,
......
......@@ -127,7 +127,7 @@ export default {
})
this.dataList.push({
num: item.num || 0,
rate: item.rate.toFixed(4) || 0,
rate: item.rate.toFixed(2) || 0,
hrate: item.hrate.toFixed(4) || 0,
trate: item.trate.toFixed(4) || 0,
statDate: item.statDate,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!