var quxianChart = function(options){
    var series0data = options.series[0].data  || [];
    var yAxisData = options.xAxis[0].data;   
    var option = {
        "title": {
            "text": "区县分布",
            "x": "center",
            "textStyle": {
                color: ['#b5e1fc']
            },
            "padding": [10, 0, 0, 0]
        },
        "tooltip": {
            "trigger": "axis"
        },
        grid: {
            top: 80,
            bottom: 30,
            left: 80
        },
        "yAxis": [{
            "type": "category",
            "name": "人次",
            "data": yAxisData,
            axisPointer: {
                type: 'shadow'
            },
            axisTick: {
                show: false
            },
            axisLine: {
                lineStyle: {
                    color: '#095f8e'
                }
            },
            axisLabel: {
                color: '#b5e1fc'
            },
            nameTextStyle: {
                color: '#b5e1fc'
            }
        }],
        "xAxis": [{
            "type": "value",
            axisPointer: {
                type: 'shadow'
            },
            axisTick: {
                show: false
            },
            axisLine: {
                lineStyle: {
                    color: '#095f8e'
                }
            },
            axisLabel: {
                color: '#fff'
            },
            splitLine: {
                show: false // 不显示坐标轴刻度
            }
        }],
        "series": [{
            "smooth": true,
            "name": "区县分布",
            "type": "bar",
            barWidth: 20,
            "label": {
                show: false,
                position: "right"
            },
            "itemStyle": {
                "normal": {
                    "lineStyle": {
                        "shadowColor": "rgba(0,0,0,0.4)"
                    },
                    barBorderRadius: [0, 8, 8, 0],
                    color: '#00e6f3'
                }
            },
            "data": series0data
        }, ]
    }
    return option
},
xingbieChart = function(options){
    console.log(options)
    var title = options.title.text;
    var data = options.series[0].data
    var option =  {
        "title": {
            "text": title,
            "x": "center",
            "textStyle": {
                color: ['#b5e1fc']
            },
            "padding": [10, 0, 0, 0]
        },
        "tooltip": {
            "trigger": "item"
        },
        legend: {
            orient: 'vertical',
            // x: 'right',
            data: ['男', '女'],
            right: '25%',
            top: '40%',
            textStyle: {
                color: ['#b5e1fc']
            }
        },
        "series": [{
            "center": [
                "35%",
                "50%"
            ],
            radius: ['30%', '40%'],
            "name": "",
            "type": "pie",
            "itemStyle": {
                "normal": {
                    "label": {
                        "show": false
                    },
                    "labelLine": {
                        "show": false
                    }
                }
            },
            "data": data
        }]
    }
    return option
},
jibingTopChart = function(options){
    var title = options.title.text;
    var yAxisData = options.xAxis[0].data
    var xAxisData = options.series[0].data
    var option = {
        "title": {
            "text": title,
            "x": "center",
            "textStyle": {
                color: ['#b5e1fc']
            },
            "padding": [10, 0, 0, 0]
        },
        "tooltip": {
            "trigger": "axis"
        },
        grid: {
            top: 40,
            bottom: 30,
            left: 80
        },
        "yAxis": [{
            "type": "category",
            "name": "",
            "data": yAxisData,
            axisPointer: {
                type: 'shadow'
            },
            axisTick: {
                show: false
            },
            axisLine: {
                lineStyle: {
                    color: '#095f8e'
                }
            },
            axisLabel: {
                color: '#b5e1fc'
            },
            nameTextStyle: {
                color: '#b5e1fc'
            }
        }],
        "xAxis": [{
            "type": "value",
            axisPointer: {
                type: 'shadow'
            },
            axisTick: {
                show: false
            },
            axisLine: {
                lineStyle: {
                    color: '#095f8e'
                }
            },
            axisLabel: {
                color: '#fff'
            },
            splitLine: {
                show: false // 不显示坐标轴刻度
            }
        }],
        "series": [{
            "smooth": true,
            "name": "并发症排行",
            "type": "bar",
            barWidth: 20,
            "label": {
                show: false,
                position: "right"
            },
            "itemStyle": {
                "normal": {
                    "lineStyle": {
                        "shadowColor": "rgba(0,0,0,0.4)"
                    },
                    barBorderRadius: [0, 8, 8, 0],
                    color: '#00e6f3'
                }
            },
            "data": xAxisData
        }, ]
    }
    return option
},
qushiChart = function(options){
    console.log(options);
    var title = options.title.text;
    var xAxisData = options.xAxis[0].data;
    var series0data = options.series[0].data  || [];
	var series1data = options.series[1].data || [];
    var option = {
        "title": {
            "text": title,
            "x": "center",
            textStyle: {
                color: '#b5e1fc',
                fontSize: 16,
                fontWeight: 'bold'
            },
            "padding": [10, 0, 0, 0]
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'cross',
                crossStyle: {
                    color: '#fff'
                }
            }
        },
        "grid": {
            top: '90',
            left: '60'
        },
        legend: {
            data: ['新增人次', '环比'],
            textStyle: {
                color: '#b5e1fc'
            },
            top: '40'
        },
        xAxis: [{
            type: 'category',
            "data": xAxisData,
            axisPointer: {
                type: 'shadow'
            },
            axisTick: {
                show: false
            },
            axisLine: {
                lineStyle: {
                    color: '#095f8e'
                }
            },
            axisLabel: {
                color: '#b5e1fc'
            }
        }],
        yAxis: [{
                type: 'value',
                name: '新增人次',
                nameTextStyle: {
                    color: '#b5e1fc' // 坐标轴名称颜色
                },
                splitLine: {
                    show: false
                },
                axisLine: {
                    lineStyle: {
                        color: '#095f8e'
                    }
                },
                axisLabel: {
                    color: '#b5e1fc'
                }
            },
            {
                type: 'value',
                name: '环比',
                nameTextStyle: {
                    color: '#b5e1fc' // 坐标轴名称颜色
                },
                splitLine: {
                    show: false // 不显示坐标轴刻度
                },
                axisLine: {
                    lineStyle: {
                        color: '#095f8e' // 坐标轴轴线颜色
                    }
                },
                axisLabel: {
                    color: '#b5e1fc' // 坐标轴刻度标签文本颜色
                }
            }
        ],
        series: [{
                name: '新增人次',
                type: 'bar',
                "data":series0data,
                barWidth: 20,
                label: {
                    normal: {
                        show: true,
                        position: 'top', // 在柱状图上方显示
                        color: '#fff' // 柱状图上方显示的数值颜色
                    }
                },
                itemStyle: {
                    barBorderRadius: [8, 8, 0, 0],
                    color: '#00e6f3'
                }
            },
            {
                name: '环比',
                type: 'line',
                yAxisIndex: 1,
                "data": series1data,
                itemStyle: {
                    color: '#03fa6d'
                }
            }
        ]
    }
    return option
},
nianlingChart = function(options){
    var title = options.title.text;
    var data = options.series[0].data
    var legend = data.map(function(item){
        return item.name;
    })
    var option =  {
        "title": {
            "text": title,
            "x": "center",
            "textStyle": {
                color: ['#b5e1fc']
            },
            "padding": [10, 0, 0, 0]
        },
        "tooltip": {
            "trigger": "item"
        },
        legend: {
            orient: 'vertical',
            data: legend,
            right: '15%',
            top: '25%',
            textStyle: {
                color: ['#b5e1fc']
            }
        },
        "series": [{
            "center": [
                "35%",
                "50%"
            ],
            radius: ['30%', '40%'],
            "name": "",
            "type": "pie",
            "itemStyle": {
                "normal": {
                    "label": {
                        "show": false
                    },
                    "labelLine": {
                        "show": false
                    }
                }
            },
            "data": data
        }]
    }
    return option
}