| | |
| | | |
| | | <script> |
| | | import * as echarts from 'echarts'; |
| | | //引入提示框 |
| | | import "echarts/lib/component/tooltip"; |
| | | //引入chart字体自适应 |
| | | import { |
| | | chartFontsize |
| | | } from '@/assets/js/chartFontsize' |
| | | export default { |
| | | name: "abeamProChart", |
| | | chart: "", |
| | |
| | | this.$options.chart.setOption(opt); |
| | | }, |
| | | setData(sendData) { |
| | | this.$options.chartData = sendData; |
| | | let dataColor = sendData.color; |
| | | let bgColor = sendData.bgColor; |
| | | let yData = sendData.yData; |
| | |
| | | axisLabel: { |
| | | show: true, |
| | | textStyle: { |
| | | color: '#fff' |
| | | color: '#fff', |
| | | fontSize: chartFontsize(12), |
| | | }, |
| | | }, |
| | | splitLine: { |
| | |
| | | axisLabel: { |
| | | show: true, |
| | | textStyle: { |
| | | color: '#fff' |
| | | color: '#fff', |
| | | fontSize: chartFontsize(12), |
| | | }, |
| | | }, |
| | | splitLine: { |
| | |
| | | normal: { |
| | | show: true, |
| | | position: 'insideRight', |
| | | fontSize: 20, |
| | | fontSize: chartFontsize(20), |
| | | color: '#021750' |
| | | } |
| | | }, |
| | |
| | | }, |
| | | resize() { |
| | | this.$options.chart.resize(); |
| | | this.setData(this.$options.chartData); |
| | | } |
| | | }, |
| | | mounted() { |