<!-- 欠费分析 -->
<template>
	<view class="arrears">
		<view class="arrears-line">
			<LineChart :chartData="chartData" :title="title" :opts="opts"/>
		</view>
	</view>
</template>

<script>
	import LineChart from '@/components/lineChart.vue'
	export default {
		components: {
			LineChart
		},
		props: {
			title: {
				type: String,
				default: ''
			},
			chartData: {
				type: Object,
				default: () => {
					return {}
				}
			},
			opts: {
				type: Object,
				default: () => {
					return {
						xAxis: {
							rotateLabel: false,
							labelCount: 6
						},
						yAxis: {
							showTitle: true,
							splitNumber: 5,
							data: [{
								title: '元',
								titleOffsetY: -5
							}]
						},
						legend: {
							show: false
						},
						dataLabel: false,
						extra: {
							column: {
								width: 20
							}
						}
					}
				}
			}
		}
	}
</script>