<template>
    <div class="container">
        <!-- EOutSheepfold 出栏预测-->
        <div id="EOutSheepfold" style="height:400px;"></div>
    </div>
</template>

<script>
export default {
    name: "EOutSheepfold",
    data() {
        return {};
    },
    mounted() {
        this.drawChart();
    },
    methods: {
        drawChart() {
            // 基于准备好的dom，初始化echarts实例
            let myChart = this.$echarts.init(
                document.getElementById("EOutSheepfold")
            );
            // 指定图表的配置项和数据
            let option = {
                title: {
                    text: "出栏预测",
                    left: "center",
                    bottom: 0
                },
                color: ["#7c92f7"],
                tooltip: {
                    trigger: "axis",
                    axisPointer: {
                        // 坐标轴指示器，坐标轴触发有效
                        type: "shadow" // 默认为直线，可选为：'line' | 'shadow'
                    }
                },
                grid: {
                    left: "8%",
                    right: "4%",
                    bottom: "10%",
                    containLabel: true
                },
                xAxis: [
                    {
                        type: "category",
                        data: ["七月", "八月", "十月", "十一月", "十二月", "一月", "二月"],
                        axisTick: {
                            alignWithLabel: true
                        }
                    }
                ],
                yAxis: [
                    {
                        type: "value"
                    }
                ],
                series: [
                    {
                        name: "数量",
                        type: "bar",
                        barWidth: "60%",
                        data: [10, 88, 200, 334, 390, 330, 220]
                    }
                ]
            };
            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option);
        }
    }
};
</script>

<style lang="scss" scoped>

</style>