<template>
  <bml-lazy-show :time="1000">
    <bmchart :scr='src' :options="optionData" :style="customStyles"></bmchart>
  </bml-lazy-show>
</template>
<script>
import bmlLazyShow from './bml-lazy-show'

export default {
  components:{bmlLazyShow},
  props: {
      src:{
        type: String,
        default: 'bmlocal://assets/chart/bm-map.html'
      },
      value:{
        type: Object,
        default:{}
      },
      width: {
        type: Number,
        default: 730
      },
      height: {
        type: Number,
        default: 600
      }
    },
    data(){
      return {
        //optionData: this.$format(this.value)
      }
    },
    methods:{

    },
    computed: {
      customStyles(){
        return {width: this.width,height:this.height}
      },
      optionData(){
        return this.$format(this.value);
      }
    },
}
</script>
<style lang="scss" src="../css/chart.scss"/>