| | |
| | | this.setOptions(this.chartData) |
| | | }, |
| | | setOptions(val) { |
| | | // console.log(val,'123'); |
| | | function fontSize(res) { |
| | | let clientWidth = |
| | | window.innerWidth || |
| | |
| | | data: val.xAxis, |
| | | boundaryGap: false, |
| | | axisTick: { |
| | | show: false, |
| | | show: true, |
| | | }, |
| | | // axisTick: { // 决定是否显示坐标刻度 |
| | | // alignWithLabel: true, |
| | |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | position: function (pt) { |
| | | return [pt[1], '-14%'] |
| | | return [pt[1], '-13%'] |
| | | }, |
| | | textStyle: { |
| | | fontSize: fontSize(0.117), // 字体大小 |
| | |
| | | { |
| | | start: 0, |
| | | end: 20, |
| | | bottom: fontSize(3.3), |
| | | top: fontSize(4.8), |
| | | height: fontSize(0.5), |
| | | }, |
| | | ], |