暂降分布统计

This commit is contained in:
仲么了
2024-02-26 19:17:08 +08:00
parent 31e4aa1eb7
commit 592d795e2b
5 changed files with 656 additions and 98 deletions

View File

@@ -6,7 +6,7 @@
import { onBeforeUnmount, onMounted, ref, defineExpose, watch } from 'vue'
// import echarts from './echarts'
import * as echarts from 'echarts' // 全引入
import 'echarts-gl';
import 'echarts-gl'
import 'echarts/lib/component/dataZoom'
const chartRef = ref<HTMLDivElement>()
@@ -24,90 +24,6 @@ const initChart = () => {
chart?.dispose()
chart = echarts.init(chartRef.value as HTMLDivElement)
console.log({
title: {
left: 'center',
textStyle: {
color: '#000',
fontSize: 18
},
...(props.options.title || null)
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
label: {
color: '#fff',
fontSize: 16
}
},
textStyle: {
color: '#fff',
fontStyle: 'normal',
opacity: 0.35,
fontSize: 14
},
backgroundColor: 'rgba(0,0,0,0.35)',
borderWidth: 0,
...(props.options.tooltip || null)
},
legend: {
right: 20,
top: 0,
itemGap: 10,
itemStyle: {},
textStyle: {
fontSize: 12,
padding: [2, 0, 0, 0] //[上、右、下、左]
},
itemWidth: 15,
itemHeight: 10,
...(props.options.legend || null)
},
grid: {
top: '50px',
left: '10px',
right: '60px',
bottom: props.options.options?.dataZoom === null ? '10px' : '40px',
containLabel: true
},
xAxis: handlerXAxis(),
yAxis: handlerYAxis(),
dataZoom: [
{
type: 'inside',
height: 13,
start: 0,
bottom: '20px',
end: 100,
...(props.options.dataZoom || null)
},
{
start: 0,
height: 13,
bottom: '20px',
end: 100,
...(props.options.dataZoom || null)
}
],
color: [
...(props.options.color || ''),
'#07CCCA ',
'#00BFF5',
'#FFBF00',
'#77DA63',
'#D5FF6B',
'#Ff6600',
'#FF9100',
'#5B6E96',
'#66FFCC',
'#B3B3B3'
],
series: props.options.series,
...props.options.options
})
chart.setOption({
title: {
left: 'center',
@@ -157,8 +73,8 @@ const initChart = () => {
bottom: props.options.options?.dataZoom === null ? '10px' : '40px',
containLabel: true
},
xAxis: handlerXAxis(),
yAxis: handlerYAxis(),
xAxis: props.options.xAxis ? handlerXAxis() : null,
yAxis: props.options.yAxis ? handlerYAxis() : null,
dataZoom: [
{
type: 'inside',
@@ -178,7 +94,7 @@ const initChart = () => {
],
color: [
...(props.options.color || ''),
'#07CCCA ',
'#07CCCA',
'#00BFF5',
'#FFBF00',
'#77DA63',
@@ -194,7 +110,7 @@ const initChart = () => {
})
setTimeout(() => {
chart.resize()
},0)
}, 0)
}
const handlerYAxis = () => {
let temp = {