


function jrbm(arr_name, arr_value) {

    var myChart_human = echarts.init(document.getElementById('jrbm'));

    //组织数据-孙一石
    var items = []
    $.each(arr_value, function (index, data) {

        var it = {
            value: data,
            itemStyle: {
                color: new echarts.graphic.LinearGradient
                (
                    1, 0, 0, 1,
                    [
                        {offset: 0, color: '#00ffb9'},
                        {offset: 0.5, color: '#26ddbe'},
                        {offset: 0.8, color: '#2ebc95'},
                        {offset: 1, color: '#2ebc95'}
                    ]
                )

            }
        }
        items.push(it)
    })


    option_human = {
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },

        grid: {
            top: '10%',
            left: '10%',
            right: '10%',
            bottom: '10%',
            containLabel: true
        },
        xAxis: {
            axisLine: {
                show: false
            },
            axisLabel: {
                show: false
            },
            splitLine: {
                show: false
            },
        },
        yAxis: {

            type: 'category',
            data: arr_name,
            axisLine: {
                lineStyle: {
                    color: '#00cdef'
                }
            },
            axisTick: {
                show: false
            },

        },


        series: [
            {
                type: 'bar',
                barWidth: 10,
                itemStyle: {        //上方显示数值
                    normal: {
                        label: {
                            show: true, //开启显示
                            position: 'insideLeft', //在上方显示
                            textStyle: { //数值样式
                                color: 'white',
                                fontSize: 11
                            }
                        }
                    }
                },
                data: items
            }
        ]

    };
    myChart_human.setOption(option_human);



}


