import * as echarts from "echarts";
import { color } from "highcharts";

export const galleryLine = {
    tooltip: {
        trigger: "axis",
    },
    grid: {
        top: 28,
        left: 10,
        right: 26,
        bottom: 0,
        containLabel: true,
    },
    xAxis: {
        name: "时间",
        nameLocation: "end",
        nameGap: 4,
        nameTextStyle: {
            fontSize: 10,
            color: "#666666"
        },
        type: 'category',
        // 分割线
        axisTick: {
            show: false,
        },
        splitLine: {
            show: false,
        },
        axisLabel: {
            // interval: 0,
            rotate: 15,
            margin: 14,
            textStyle: {
                color: "#666666",
                fontSize: 10
            },
        },
        data: ['9/1', '9/7', '9/13', '9/19', '9/25', '10/1', '10/7']
    },
    yAxis: {
        name: "xx指标",
        nameLocation: "end",
        type: 'value',
        nameTextStyle: {
            fontSize: 10,
            color: "#666666"
        },
        axisTick: {
            show: false,
        },
        axisLine: {
            show: true,
            lineStyle: {
                color: "#BBBBBB",
            },
        },
        axisLabel: {
            textStyle: {
                color: "#666666",
                fontSize: 10
            },
        },
        // 分割线
        splitLine: {
            show: false,
            lineStyle: {
                color: "rgba(255, 255, 255, 0.1)",
            },
        },
    },
    series: [
        {
            data: [40, 58, 62, 64, 68, 74, 80],
            type: 'line',
            symbolSize: 6,
            itemStyle: {
                color: '#2199F8' // 设置数据点颜色为红色
            },

            // itemStyle: {
            //     color: '#CECECE' // 设置数据点颜色
            // },
            // lineStyle: {
            //     type: 'dashed', // 设置线条为虚线
            //     width: 2,       // 设置线条宽度
            //     color: '#CECECE' // 设置线条颜色
            // }
        }
    ],
}

export const galleryIndicatorLine = {
    tooltip: {
        trigger: "axis",
    },
    legend: {
        icon: 'roundRect',
        bottom: 0,
        right: 10,
        orient: 'horizontal',
        itemWidth: 15,
        itemHeight: 5,
        itemGap: 20,
        textStyle: {
          align: 'left',
          color:'#fff'
        },
        data: [
          { name: '褪绿率', textStyle: { color: '#66B9FB' }, itemStyle: {color: "#66B9FB"} },
          { name: '花芽率', textStyle: { color: '#1B98FC' }, itemStyle: {color: "#1B98FC"} },
          { name: '花蕾率', textStyle: { color: '#036CC0' }, itemStyle: {color: "#036CC0"} },
          { name: '生长异常', textStyle: { color: '#F7BE5A' }, itemStyle: {color: "#F7BE5A"} },
          { name: '病虫异常', textStyle: { color: '#F99851' }, itemStyle: {color: "#F99851"} }
        ]
      },
    grid: {
        top:5,
        left: 8,
        right: 8,
        bottom: 20,
        containLabel: true,
    },
    xAxis: {
        type: 'category',
        boundaryGap: false,
        // 分割线
        axisTick: {
            show: false,
        },
        splitLine: {
            show: false,
        },
        axisLabel: {
            // interval: 0,
            rotate: 15,
            margin: 14,
            textStyle: {
                color: "#999999",
                fontSize: 12
            },
        },
        axisLine: {
            lineStyle: {
                color: "#333333",
            }
        },
        data: ['9/1', '9/7', '9/13', '9/19', '9/25', '10/1', '10/7']
    },
    yAxis: [{
        type: 'value',
        offset: 6,
        axisTick: {
            show: false,
        },
        axisLine: {
            show: false,
        },
        axisLabel: {
            align: "center",
            textStyle: {
                color: "#999999",
                fontSize: 12
            },
        },
        // 分割线
        splitLine: {
            lineStyle: {
                type: [4, 3],
                dashOffset: 5,
                color: "#333333",
            },
        },
        min: 0, // 最小值固定为0
        max: 100, // 最大值固定为100
        splitNumber: 5, // 设置5个分割段
    }],
    series: [
        {
            name: "褪绿率",
            data: [
                ["9/1", 10],
                ["9/7", 30],
                ["9/13", 80],
            ],
            type: 'line',
            smooth: true,
            symbol: "none",
            itemStyle: { color: "#66B9FB" },
            lineStyle: {
                color: "#66B9FB", // 折线颜色为红色
                width: 2, // 线条宽度
            },
        },
        {
            name: "花芽率",
            data: [
                ["9/7", 8],
                ["9/19", 50],
                ["9/25", 80],
            ],
            type: 'line',
            smooth: true,
            symbol: "none",
            itemStyle: { color: "#1B98FC" },
            lineStyle: {
                color: "#1B98FC", // 折线颜色为红色
                width: 2, // 线条宽度
            },
        },
        {
            name: "花蕾率",
            data: [
                ["9/19", 12],
                ["9/25", 30],
                ["10/1", 60],
                ["10/7", 70],
            ],
            type: 'line',
            smooth: true,
            symbol: "none",
            itemStyle: { color: "#036CC0" },
            lineStyle: {
                color: "#036CC0", // 折线颜色为红色
                width: 2, // 线条宽度
            },
        },
        // {
        //     name: "物候监测",
        //     data: [10, 25, 32, 34, 38, 44, 20],
        //     type: 'line',
        //     symbol: "none",
        //     smooth: true,
        //     itemStyle: { color: "#2199F8" },
        //     lineStyle: {
        //         color: "#2199F8", // 折线颜色为红色
        //         width: 2, // 线条宽度
        //     },
        //     areaStyle: {
        //         color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
        //             { offset: 0, color: "rgba(33, 153, 248, 0.2)" }, // 渐变起始颜色
        //             { offset: 1, color: "rgba(138, 203, 255, 0.02)" }, // 渐变结束颜色
        //         ]),
        //     },
        //     markPoint : {
        //         symbol: 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z',
        //         symbolSize: [0, 0],
        //         data: [
        //             {
        //                 name: "text",
        //                 value: "催醒追肥",
        //                 xAxis: '9/13',
        //                 yAxis: 32,
        //                 symbolOffset: [0, "-50%"],
        //                 label: {
        //                     offset: [0, -22],
        //                     color: "#fff",
        //                     // backgroundColor: {
        //                     //     image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAlCAYAAADhh6/DAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNS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3A+pA/p3dMbgAeuOPc2x5kAAAAASUVORK5CYII=",
        //                     // },
        //                     backgroundColor: "#2199F8",
        //                     padding: [2, 10, 0, 10],
        //                     height: 20,
        //                     borderRadius: 10,
        //                     // borderRadius: 10,
        //                 },
        //             },
        //             {
        //                 name: "mark",
        //                 xAxis: '9/13',
        //                 yAxis: 32,
        //                 value: "",
        //                 label: {
        //                     backgroundColor: "#fff",
        //                     borderWidth: 2,
        //                     borderColor: "rgba(255, 255, 255, 0.5)",
        //                     borderRadius: 8,
        //                     width: 6,
        //                     height: 6,
        //                 },
        //             },
        //         ]
        //     },
        // },
        {
            name: "生长异常",
            data: [80, 88, 92, 84, 88, 74, 80],
            type: 'line',
            symbol: "none",
            smooth: true,
            itemStyle: { color: "#FFB82E" },
            lineStyle: {
                color: "#FFB82E", // 折线颜色为红色
                width: 2, // 线条宽度
            },
            areaStyle: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                    { offset: 0, color: "rgba(255, 183, 0, 0.2)" }, // 渐变起始颜色
                    { offset: 1, color: "rgba(254, 233, 96, 0.02)" }, // 渐变结束颜色
                ]),
            },
            // markPoint : {
            //     symbol: 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z',
            //     symbolSize: [0, 0],
            //     data: [
            //         {
            //             name: "text",
            //             value: "冬季基肥",
            //             xAxis: '9/19',
            //             yAxis: 84,
            //             symbolOffset: [0, "-50%"],
            //             label: {
            //                 offset: [0, -22],
            //                 color: "#fff",
            //                 backgroundColor: "#FFB82E",
            //                 padding: [2, 10, 0, 10],
            //                 height: 20,
            //                 borderRadius: 10,
            //                 // borderRadius: 10,
            //             },
            //         },
            //         {
            //             name: "mark",
            //             xAxis: '9/19',
            //             yAxis: 84,
            //             value: "",
            //             label: {
            //                 backgroundColor: "#fff",
            //                 borderWidth: 2,
            //                 borderColor: "rgba(255, 255, 255, 0.5)",
            //                 borderRadius: 8,
            //                 width: 6,
            //                 height: 6,
            //             },
            //         },
            //     ]
            // },
        },
        {
            name: "病虫异常",
            data: [40, 28, 22, 64, 28, 24, 40],
            type: 'line',
            smooth: true,
            symbol: "none",
            itemStyle: { color: "#FF7219" },
            lineStyle: {
                color: "#FF7219", // 折线颜色为红色
                width: 2, // 线条宽度
            },
            areaStyle: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                    { offset: 0, color: "rgba(255, 114, 25, 0.2)" }, // 渐变起始颜色
                    { offset: 1, color: "rgba(255, 114, 25, 0.02)" }, // 渐变结束颜色
                ]),
            },
            // markPoint : {
            //     symbol: 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z',
            //     symbolSize: [0, 0],
            //     data: [
            //         {
            //             name: "text",
            //             value: "冬季清园",
            //             xAxis: '10/1',
            //             yAxis: 24,
            //             symbolOffset: [0, "-50%"],
            //             label: {
            //                 offset: [0, -22],
            //                 color: "#fff",
            //                 backgroundColor: "#FF7219",
            //                 padding: [2, 10, 0, 10],
            //                 height: 20,
            //                 borderRadius: 10,
            //                 // borderRadius: 10,
            //             },
            //         },
            //         {
            //             name: "mark",
            //             xAxis: '10/1',
            //             yAxis: 24,
            //             value: "",
            //             label: {
            //                 backgroundColor: "#fff",
            //                 borderWidth: 2,
            //                 borderColor: "rgba(255, 255, 255, 0.5)",
            //                 borderRadius: 8,
            //                 width: 6,
            //                 height: 6,
            //             },
            //         },
            //     ]
            // },
        },
    ],
}