123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- <!-- **************************************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>
|