<template>
    <div class="showBi">
        <div >
            <div></div>
            <div id="chinaMap"></div>
        </div>
    </div>
</template>
<script>
import EleReasize from "../../../../assets/js/EleResize.js";
export default {
    data(){
        return{

        }
    },
    created(){

    },
    mounted(){
        this.getChinaMap();
    },
    methods:{
       getChinaMap(){
            var _this = this;
      var titleBI;
      var chart = this.$echarts.init(document.getElementById("chinaMap"));
      var resDiv = document.getElementById("customerBIOne");
      let listener = function() {
        chart.resize();
      };
      EleReasize.on(resDiv, listener);
      var option = {
        color: [
          "#51B0FF",
          "#b7e5a1",
          "#DC4F4A",
          "#ff9c00",
          "#f48b7b",
          "#3480cb"
        ],
        title: {
          text: "客户统计数据",
          left: "center",
          top: "3%",
          color: "#000",
          subtext: "模拟数据"
        },
        tooltip: {
          trigger: "item",
          formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
          bottom: 10,
          left: "center",
          data: []
        },
        series: [
          {
            name: "访问来源",
            type: "pie",
            radius: "55%",
            center: ["50%", "50%"],
            data: [
              { value:0, name: "湖北省" },
            ],
            emphasis: {
              itemStyle: {
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowColor: "rgba(0, 0, 0, 0.5)"
              }
            }
          }
        ]
      };

      chart.setOption(option);
       }, 
    },
}
</script>