var tmpl=`
<div id="bar" style="width:100％;height:500px">
</div>
`
module.exports=
`{
   template:'${tmpl}',
   props:["barstyle","data"],
   data:function(){
     return {
       steps:this.psteps?this.psteps:[],
       option:this.data,
     };
   },
   methods:{
     setSteps(msteps){
        this.steps=msteps;
     },
     buildEcharts(id){
         var obj = echarts.init(document.getElementById(id));
         var options = this.option;
         obj.setOption(options);
     },
   },
   created:function(){

   },
   mounted:function(){
    var id=Math.round(Math.random()*500);
     $('#bar').attr('id','bar_'+id);
     this.buildEcharts("bar_"+id);
   },
   vname:"gsb-bar"
}`
