var tmpl=`
<div id="china" :style="chinastyle">
</div>
`
module.exports=
`{
   template:'${tmpl}',
   props:["chinastyle","chinadata"],
   data:function(){
     return {
     mydata:this.chinadata,

     };
   },
   methods:{
     buildEcharts(id){

       var obj = echarts.init(document.getElementById(id));
         var optionMap={
               backgroundColor: '#FFFFFF',
               title:{
                   text: '全国女性创业家统计大数据',
                   subtext: '',
                   x:'center'
               },
               tooltip:{
                   trigger:'item'
               },
               visualMap:{
                   show : true,
                   x: 'left',
                   y: 'center',
                   splitList:[
                       {start: 500, end:600},{start: 400, end: 500},
                       {start: 300, end: 400},{start: 200, end: 300},
                       {start: 100, end: 200},{start: 0, end: 100},
                   ],
                   color: ['#5475f5', '#9feaa5', '#85daef','#74e2ca', '#e6ac53', '#9fb5ea']
               },
               series: [{
                   name: '数据',
                   type: 'map',
                   mapType: 'china',
                   roam: true,
                   label: {
                       normal: {
                           show: true
                       },
                       emphasis: {
                           show: false
                       }
                   },
                   data:this.mydata
               }]
          };
      obj.setOption(optionMap);
     },
   },
   mounted:function(){
   var id=Math.round(Math.random()*500);
   $('#china').attr('id','china_'+id);
   this.buildEcharts('china_'+id);
   },
   vname:"gsb-china"
}`
