Browse Source

2022-11-24 update

1. 调整曲线偏差率分析图表为16向
moccus 2 years ago
parent
commit
c6f3264eb4

+ 5 - 1
src/pages/curveDeviation/rateAnalysis/components/chart.vue

@@ -54,7 +54,11 @@ const option = computed({
 				radius: '70%',
 				center: ['60%','50%']
 			},
-			tooltip: {},
+			tooltip: {
+				formatter: (params) => {
+					return `${params.seriesName}m<br/>${params.value>1? '频次:'+ params.value: ''}`
+				}
+			},
 			series: props.series || [],
 			legend: {
 				show: true,

+ 7 - 3
src/pages/curveDeviation/rateAnalysis/index.vue

@@ -133,8 +133,12 @@ const funSubmit = async (params) => {
 					title: chart.wt,
 					subtext: '风速风向分布图',
 					xAxis: {
-						type: 'value',
-						max: 360,
+						type: 'category',
+						boundaryGap: false,
+						data: ['N','', 'N-E','', 'E','', 'S-E','', 'S','', 'S-W','', 'W','', 'W-N',''],
+						splitLine: {
+							show: true
+						}
 					},
 					series: chart.roses?.length ?chart.roses.map((o, index) => {
 						return {
@@ -157,7 +161,7 @@ const funSubmit = async (params) => {
 					xAxis: {
 						type: 'category',
 						boundaryGap: false,
-						data: ['北', '东北', '东', '东南', '南', '西南', '西', '西北'],
+						data: ['N','', 'N-E','', 'E','', 'S-E','', 'S','', 'S-W','', 'W','', 'W-N',''],
 						splitLine: {
 							show: true
 						}