<!-- **************************************NO.15 取水口*************************************** -->
<template>
	<div class="chart-container">
		<div id="waterintake" style="width: 100%; height:23vh;">
		</div>
	</div>
</template>

<script>
	import * as echarts from 'echarts';
	export default {
		name: 'waterintake',
		data() {
			return {
				count: 0
			}
		},
		mounted() {
			this.myEcharts()

		},

		methods: {
			// 出处 http://192.144.199.210:8080/editor/index.html?chart_id=AQ8Ea8ewtkr0NVzH
			myEcharts() {


				var chartDom = document.getElementById('waterintake');
				var myChart = echarts.init(chartDom);
				var option;
				  option = {
				     color: ['#1890FF', '#12DDA1', '#F78048', '#FFB026', '#FD4D63', 'rgba(255,255,255,.5)'],
				     tooltip: {
				         trigger: 'item',
				         padding: [10, 10, 10, 10],
				         formatter: '{b} :<br/> {d}%',
				     },
				     series: [
				         {
				             name: '',
				             type: 'pie',
				             radius: ['36%', '66%'],
				             center: ['50%', '50%'],
				             label: {
				                 fontSize: 10,
				                 color: '#00a0e5',
				                 formatter: '{b} {c}',
				                 // 自定义富文本样式
				               
				             },
				             labelLine: {
				                 show: true,
				                 // length: 6,
				                 // length2: 15
				             },
				             data: [
				                 {
				                     name: '双辽市',
				                     value: '40',
				                 },
				                 {
				                     name: '梨树县',
				                     value: '25',
				                 },
				                 {
				                     name: '伊通县',
				                     value: '18',
				                 },
				                 {
				                     name: '铁东区',
				                     value: '12',
				                 },
				                 {
				                     name: '铁西区',
				                     value: '5',
				                 },
				             ],
				         },
				         {
				             type: 'pie',
				             radius: ['36%', '43%'],
				             center: ['50%', '50%'],
				             silent: true,
				             data: [
				                 {
				                     name: '',
				                     value: 1,
				                 },
				             ],
				         },
				     ],
				 };
				option && myChart.setOption(option);
			},

		},


	}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
	.chart-container {
		width: 100%;
		height: auto;
		position: relative;
		padding-bottom: 10px;
		display: flex;
	}
</style>
