<template>
    <exDialog
        @close="closeDialog"
        :winName="title || '图表'"
        :visible.sync="isShowWin"
        :width="(width || 1200)+'px'"
        >
        <chartCom ref="chartEl" :chrCfg="chrCfg"></chartCom>
    </exDialog>
</template>

<script>
import chartCom from "./chartCommon.vue";

export default {
    components:{
        chartCom
    },
    props:["title","width","chrCfg"],
    data() {
        return {
            loading: false,
            chartloading : false,
            isShowWin : false,
        }
    },


    mounted() {

    },
    computed:{
    },

    methods: {
        showWin(){
            this.isShowWin = true;
        },
        closeDialog(){
            this.isShowWin = false;
            this.$emit("close")
        },
        clearChartData(){
            this.$nextTick(()=>{
                this.$refs.chartEl.clearChartData();
            });
        },
        reDraw(){
            this.$nextTick(()=>{
                this.$refs.chartEl.reDraw();
            });
        }
    }
}
</script>
<style lang="less" scoped>



</style>


