echarts遇到的問題


X軸無偏移: axisTick: {

   alignWithLabel: true

    },

 

x軸顯示所有數據項且避免擁擠在xAxis設置: axisLabel: {

    interval: 0,

    rotate: 40

  },

另外設置:grid: {

    bottom: 70,

    x: 40,

    x2: 100,

    y2: 150

},

 

hover加豎線: tooltip: {

    trigger: 'axis',

    backgroundColor: 'rgba(74,56,31,0.85)',

    borderColor: 'rgba(74,56,31,0.85)',

    axisPointer: {

        lineStyle: {

            color: '#a19c96'

        }

    }

},

 

每條記錄加豎線在xAxis或yAxis 

axisLine: {

//                            lineStyle: {

//                                color: '#f0ede8'

//                            }

//                        },

//                        splitLine: {

//                            show: true,

//                            lineStyle: {

//                                color: '#f0ede8'

//                            }

//                        },

 

 

防止y軸數據過大顯示不全:

grid: {

    bottom: 70,

    x: 40,

    x2: 100,

    y2: 300,

    containLabel: true   *******

},

 

 

數據更新,初始化重置數據時:

for (let j in this.lineOption.series) {
this.lineOption.series[j].data = []
this.lineOption.series[j].name = ''
}
再設置this.lineOption.series.length


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM