<!-- **************************************NO.18 消防*************************************** -->
<template>
	<div class="chart-container">
		<div id="firecontrol" style="width: 100%; height:25vh; ">
		</div>
	</div>
</template>

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

		},

		methods: {
			// 出处 http://192.144.199.210:8080/editor/index.html?chart_id=f46x0t0c7883X-D6
			myEcharts1() {
				var chartDom = document.getElementById('firecontrol');
				var myChart = echarts.init(chartDom);
				var option;
				 option = {
				    tooltip: {
				        trigger: 'axis',
				        axisPointer: {
				            type: 'shadow'
				        }
				    },
				    grid:{
				        top:'15%',
				        left:'10%',
				        right:'10%',
				        buttom:'15%',
				    },
				     xAxis: {
				        type: 'category',
				        axisLine: {
				            lineStyle: {
				                color: 'rgba(255,255,255,0.12)',
				            },
				        },
				        axisLabel: {
				            margin: 10,
				            color: '#e2e9ff',
				            textStyle: {
				                fontSize: 10
				            },
				        },
				        axisTick:{
				            show:false,
				        },
				         data: ['双辽市', '梨树县', '伊通县', '铁东区', '铁西区']
				    },
				    yAxis: {
				        nameTextStyle:{
				            color:'#fff',
				        },
				        type: 'value',
				         axisLine: {
				             show:false,
				            lineStyle: {
				                color: 'rgba(255,255,255,0.12)'
				            },
				        },
				        axisLabel: {
							 show:false,
				            formatter: '{value}',
				            color: '#e2e9ff',
				        },
				         splitLine: {
				            lineStyle: {
				                color: 'rgba(255,255,255,0.12)'
				            }
				        },
				        axisTick:{
				            show:true,
				            
				            lineStyle:{
				                color:'#fff',
				            },
				        },
				    },
				    series: [{
				        itemStyle:{
				            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
				                    offset: 0,
				                    color: 'rgba(0,244,255,1)'
				                }, {
				                    offset: 1,
				                    color: 'rgba(0,77,167,1)'
				                }], false),
				                barBorderRadius: 10,
				                opacity:0.8
				        },
				        barWidth:10,
				        label:{
				            show:true,
				            position:['0','-20'],
				            color:'#fff',
				        },
				        data: [120, 200, 150, 80, 70],
				        type: 'bar',
				    }]
				};
				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;
		flex-direction: column;
	}
</style>
