Commit 10f014a5 authored by 琉璃丶c's avatar 琉璃丶c

1.修改echarts的endvalue算法第一版

parent 24252609
......@@ -49,6 +49,16 @@ export default {
let _this = this
let layout = document.getElementById('chartView')
let chart = echarts.init(layout)
// let endValue = 10 - Math.ceil(this.xList.length / 100)
// if (endValue <= 0) {
// endValue = 5
// }
let endValue = _this.xList.length
while (endValue > 10) {
endValue = endValue / 6
}
console.log(_this.xList.length, endValue)
let options = {
// animation: false,
color: '#02a7f0',
......@@ -59,7 +69,7 @@ export default {
xAxisIndex: [0],
filterMode: 'none',
start: 0,
end: 2,
end: endValue,
zoomLock: true
}
],
......@@ -94,7 +104,8 @@ export default {
}
},
axisLabel: {
color: '#999999'
color: '#999999' // ,
// interval: 1
},
axisTick: {
alignWithLabel: true
......@@ -110,8 +121,8 @@ export default {
},
axisLabel: {
color: '#999999',
formatter: '{value} ℃',
interval: 0.5
formatter: '{value} ℃'// ,
// interval: 0.5
},
splitLine: {
lineStyle: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment