export default function getData() {
    let data = Array.from(Array(7)).map((val, ind) => {
        let day = new Date(new Date().getTime() - (7 - ind - 1) * 24 * 60 * 60 * 1000)
        return {
            day: (day.getMonth() + 1) + "." + (day.getDate() < 10 ? "0" + day.getDate() : day.getDate()),
            val: Math.ceil(Math.random() * 1000)
        }
    })
    return {
        color: ["rgba(4,187,255,1)"],
        xAxis: {
            type: "category",
            data: data.map(val => val.day),
            axisLabel: {
                color: "#FFFFFF",
            },
            axisTick: {
                show: false,
            },
        },
        yAxis: {
            type: "value",
            max: function(value) {
                return value.max + value.max * 0.25;
            },
            axisLabel: {
                color: "#FFFFFF",
            },
            axisTick: {
                show: false,
            },
        },
        grid: {
            top: 40,
            left: 40,
            right: 0,
            bottom: 30,
        },
        series: [{
            type: "pictorialBar",
            barCategoryGap: "30%",
            symbol: 'path://M0,10 L10,10 L5,0 L0,10 z',
            label: {
                normal: {
                    show: false,
                    position: "top",
                    textStyle: {
                        color: "#fff",
                    }
                }
            },
            markPoint: {
                data: [
                    { type: 'max', name: '最大值', label: { color: "#fff", } },
                ]
            },
            data: [
                1200,
                {
                    value: 2000,
                    itemStyle: {
                        color: "rgba(255,239,143,1)",
                    },
                },
                1500,
                800,
                700,
                1100,
                1300,
            ],
        }, ],
    }
}