| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-11-04 16:32:04 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-11-20 19:01:15 |
| | | * @LastEditTime: 2024-11-27 15:44:25 |
| | | * @FilePath: \bigScreen\src\views\survey\components\box\dataContent.vue |
| | | * @Description: |
| | | * |
| | |
| | | let $echarts = inject("echarts") |
| | | const curEcharts = ref(null) |
| | | |
| | | let myEcharts = reactive(null) |
| | | let myEcharts = reactive({ |
| | | chart: '' |
| | | }) |
| | | |
| | | const echartsColors = ['#1E90FF', '#36A2EB', '#FFD700', '#FFA500', '#228B22', '#8FBC8F'] |
| | | |
| | |
| | | yaxis_data.push(element.num) |
| | | }) |
| | | |
| | | myEcharts.setOption({ |
| | | myEcharts.chart.setOption({ |
| | | tooltip: { |
| | | trigger: "axis", |
| | | axisPointer: { |
| | |
| | | interval: 0, //设置为 1,表示『隔一个标签显示一个标签』 |
| | | margin: 15, |
| | | rotate: 45, //调整数值改变倾斜的幅度(范围-90到90) |
| | | textStyle: { |
| | | color: "#fff", |
| | | fontStyle: "normal", |
| | | fontFamily: "微软雅黑", |
| | | fontSize: 12, |
| | | }, |
| | | color: "#fff", |
| | | fontStyle: "normal", |
| | | fontFamily: "微软雅黑", |
| | | fontSize: 12, |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | } |
| | | |
| | | nextTick(() => { |
| | | myEcharts = $echarts.init(curEcharts.value) |
| | | myEcharts.chart = $echarts.init(curEcharts.value) |
| | | getStatistic() |
| | | }) |
| | | |
| | | const echartsResize = () => { |
| | | myEcharts && myEcharts.resize() |
| | | myEcharts.chart && myEcharts.chart.resize() |
| | | } |
| | | |
| | | useEchartsResize(echartsResize) |