Commit 6d2305ce by 王志慧

commit

1 parent 72f66fec
...@@ -233,6 +233,13 @@ export default { ...@@ -233,6 +233,13 @@ export default {
this.flag = true this.flag = true
}) })
}, },
chartAction(dataList) {
this.canvas.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: dataList.length - 1
})
},
draw (lineData, queryType) { draw (lineData, queryType) {
let data = [], let data = [],
Min=0, Min=0,
...@@ -336,6 +343,7 @@ export default { ...@@ -336,6 +343,7 @@ export default {
] ]
} }
this.canvas.setOption(options) this.canvas.setOption(options)
this.chartAction(lineData)
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this.canvas.resize() this.canvas.resize()
}) })
...@@ -489,7 +497,7 @@ export default { ...@@ -489,7 +497,7 @@ export default {
top: -20px; top: -20px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
color:#606266!important; color: #606266 !important;
} }
&-head { &-head {
display: grid; display: grid;
......
...@@ -108,7 +108,6 @@ export default { ...@@ -108,7 +108,6 @@ export default {
const date = this.dataList[0][index].statDate const date = this.dataList[0][index].statDate
var txt = date + '<br />' var txt = date + '<br />'
e.forEach(item => { e.forEach(item => {
console.log(item)
item.marker = '<span style=\"display:inline-block;margin-right:4px;border-radius:5px;width:5px;height:5px;background-color:' + this.colorList[item.componentIndex] + ';\"></span>' item.marker = '<span style=\"display:inline-block;margin-right:4px;border-radius:5px;width:5px;height:5px;background-color:' + this.colorList[item.componentIndex] + ';\"></span>'
txt = txt + item.marker + item.seriesName + ':' + item.value + '<br />' txt = txt + item.marker + item.seriesName + ':' + item.value + '<br />'
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!