Browse Source

折线图和柱状图增加滚动条

zaijin 3 năm trước cách đây
mục cha
commit
c24e3f1f5a

+ 1 - 1
components/lineChart.vue

@@ -2,7 +2,7 @@
 <template>
 	<view class="charts-box">
 		<view class="charts-box-title">{{ title }}</view>
-		<qiun-data-charts type="line" :canvas2d="true" :ontouch="true" :chartData="chartData" :opts="opts" />
+		<qiun-data-charts type="line" :canvas2d="true" :ontouch="true" :echartsApp="true" :chartData="chartData" :opts="opts" />
 	</view>
 </template>
 

+ 1 - 1
components/pieChart.vue

@@ -2,7 +2,7 @@
 <template>
 	<view class="charts-box">
 		<view class="charts-box-title">{{ title }}</view>
-		<qiun-data-charts type="pie" :canvas2d="true" :ontouch="true" :chartData="chartData" :opts="opts" />
+		<qiun-data-charts type="pie" :canvas2d="true" :echartsApp="true" :ontouch="true" :chartData="chartData" :opts="opts" />
 	</view>
 </template>
 

+ 2 - 2
manifest.json

@@ -1,6 +1,6 @@
 {
-    "name" : "智慧停车运营端",
-    "appid" : "__UNI__CE5505F",
+    "name" : "停车运营端",
+    "appid" : "__UNI__EC952D7",
     "description" : "",
     "versionName" : "1.0.0",
     "versionCode" : "100",

+ 7 - 4
pages/dataOverview/operationalAnalysis/components/arrearsAnalysis.vue

@@ -25,22 +25,25 @@
 				type: Object,
 				default: () => {
 					return {
+						enableScroll: true,
 						xAxis: {
-							rotateLabel: false,
-							labelCount: 6
+							rotateLabel: true,
+							scrollShow: true,
+							itemCount: 8
 						},
 						yAxis: {
 							showTitle: true,
 							splitNumber: 5,
 							data: [{
 								title: '元',
-								titleOffsetY: -5
+								titleOffsetY: -3
 							}]
 						},
 						legend: {
-							show: true
+							show: false
 						},
 						dataLabel: false,
+						padding: [10, 0, 10, 0],
 						extra: {
 							column: {
 								width: 20

+ 6 - 3
pages/dataOverview/operationalAnalysis/components/incomeAnalysis.vue

@@ -44,22 +44,25 @@
 				type: Object,
 				default: () => {
 					return {
+						enableScroll: true,
 						xAxis: {
 							rotateLabel: false,
-							labelCount: 6
+							scrollShow: true,
+							itemCount: 8
 						},
 						yAxis: {
 							showTitle: true,
 							splitNumber: 5,
 							data: [{
 								title: '元',
-								titleOffsetY: -5
+								titleOffsetY: -3
 							}]
 						},
 						legend: {
-							show: true
+							show: false
 						},
 						dataLabel: false,
+						padding: [10, 0, 10, 0],
 						extra: {
 							column: {
 								width: 20

+ 7 - 4
pages/dataOverview/operationalAnalysis/components/revenueAnalysis.vue

@@ -58,22 +58,25 @@
 				},
 				loading: false,
 				opts: {
+					enableScroll: true,
 					xAxis: {
-						rotateLabel: false,
-						labelCount: 6
+						rotateLabel: true,
+						scrollShow: true,
+						itemCount: 8
 					},
 					yAxis: {
 						showTitle: true,
 						splitNumber: 5,
 						data: [{
 							title: '收益(元)',
-							titleOffsetY: -5
+							titleOffsetY: -3
 						}]
 					},
 					legend: {
-						show: true
+						show: false
 					},
 					dataLabel: false,
+					padding: [10, 0, 10, 0],
 					extra: {
 						column: {
 							width: 20

+ 28 - 2
pages/dataOverview/operationalAnalysis/components/tollCollectorPerformance.vue

@@ -5,7 +5,7 @@
 			<TableRanking :loading="loading" :title="title" :tableTh="tableTh" :tableData="tableData"  @pageChange="pageChange"/>
 		</template>
 		<template v-else>
-			<LineChart v-if="chartData.series[0].data.length" :chartData="chartData" :title="title"/>
+			<LineChart v-if="chartData.series[0].data.length" :chartData="chartData" :title="title" :opts="opts"/>
 			<view class="empty" v-else>
 				<u-empty></u-empty>
 			</view>
@@ -55,7 +55,33 @@
 				},
 				reportType: '',
 				queryDate: '',
-				loading: false
+				loading: false,
+				opts: {
+					enableScroll: true,
+					xAxis: {
+						rotateLabel: true,
+						scrollShow: true,
+						itemCount: 8
+					},
+					yAxis: {
+						showTitle: true,
+						splitNumber: 5,
+						data: [{
+							title: '元',
+							titleOffsetY: -3
+						}]
+					},
+					legend: {
+						show: false
+					},
+					dataLabel: false,
+					padding: [10, 0, 10, 0],
+					extra: {
+						column: {
+							width: 20
+						}
+					}
+				}
 			}
 		},
 		methods: {

+ 7 - 4
pages/dataOverview/operationalAnalysis/components/trafficFlow.vue

@@ -25,22 +25,25 @@
 				type: Object,
 				default: () => {
 					return {
+						enableScroll: true,
 						xAxis: {
-							rotateLabel: false,
-							labelCount: 6
+							rotateLabel: true,
+							scrollShow: true,
+							itemCount: 8
 						},
 						yAxis: {
 							showTitle: true,
 							splitNumber: 5,
 							data: [{
 								title: '辆',
-								titleOffsetY: -5
+								titleOffsetY: -3
 							}]
 						},
 						legend: {
-							show: true
+							show: false
 						},
 						dataLabel: false,
+						padding: [10, 0, 10, 0],
 						extra: {
 							column: {
 								width: 20