<template>
    <div class="linechart" id="dd"></div>
</template>

<script>
//import  from '';

export default {
    name: "pieChart", //
    components: {},
    data() {
        return {};
    },

    computed: {},

    methods: {},

    mounted() {
        // 基于准备好的dom，初始化echarts实例
        let myChart = this.$echarts.init(document.getElementById("dd"));

        let option = {
            series: [
                {
                    type: "pie",
                    data: [
                        {
                            value: 335,
                            name: "直接访问",
                        },
                        {
                            value: 234,
                            name: "联盟广告",
                        },
                        {
                            value: 1548,
                            name: "搜索引擎",
                        },
                    ],
                },
            ],
        };
        myChart.setOption(option);
    },
};
</script>

<style lang='less' scoped>
.linechart {
    width: 100%;
    height: 120px;
    margin: 0 auto;
}
</style>