var phnum=['1','2','3','4','5','6','7','8','9','10'];//排行数
var getmydmc=['卫健委','中级人民法院','公积金','民政局','不动产','文旅局','住建局','某某某','某某某米','某某某某'];//数据点名称
var getmyd=[10,3,5,2,5,6,8,6,4,3];//接口数值
var getmydzd =[];//学生满意度100%
for (let i = 0; i < getmyd.length; i++) {
    getmydzd.push(15)
};
var myChart_ph = echarts.init(document.getElementById('phb'));

option_ph = {
    grid: {
        show:false,
        width:190,	
        left: '0',
        right: '20',
        bottom: '0',
        top: '10',
    },

    tooltip: {
        trigger: 'axis',
		align:'left',
        axisPointer: {
            type: 'none'
        },
        formatter: function(params) {
            return '接口调用数<br>'+ params[0].name  + ' : ' + params[0].value + '个'
        }
    },
    xAxis: {
        show: false,
        type: 'value'
    },
    yAxis: [
		{
        type: 'category',
        inverse: true,
        axisLabel: {
			interval :false,
            textStyle: {
                color: '#fff',
                fontSize: '16',
                lineHeight:'40',
            },
            // 调整左侧文字的3个属性，缺一不可
             verticalAlign: 'bottom',
             align:'left',
            //调整文字上右下左
             padding: [0,0,10,55],
        },
        splitLine: {
            show: false
        },
        axisTick: {
            show: false
        },
        axisLine: {
            show: false
        },
        data:getmydmc
    },
	{type: 'category',
	    inverse: true,
	    axisLabel: {
			interval :false,
	        textStyle: {
	            color: '#108bf8',
	            fontSize: '12',
	            lineHeight:'40',
	        },
	        // 调整左侧文字的3个属性，缺一不可
	         verticalAlign: 'bottom',
	         align:'left',
	        //调整文字上右下左
	         padding: [0,0,10,-185],
			 formatter: 'TOP{value}'
	    },
	    splitLine: {
	        show: false
	    },
	    axisTick: {
	        show: false
	    },
	    axisLine: {
	        show: false
	    },
	    data:phnum
	}, 
	
	{
        type: 'category',
        inverse: true,
        axisTick: 'none',
        axisLine: 'none',
        show: true,
        axisLabel: {
            textStyle: {
                color: '#fff',
                fontSize: '12'
            },
            // 调整右侧数值文字的3个属性，缺一不可
            padding: [-5, 10, -10, 1],
			 align:'right',
			formatter: '{value}个'
        },
        data:getmyd
    }],
    series: [{
            name: '值',
            type: 'bar',
            zlevel: 1,
            itemStyle: {
                normal: {
                    barBorderRadius: 0,
                    color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
                                               offset: 0,
                                               color: '#11469e'
                                           }, {
                                               offset: 1,
                                               color: '#108bf7'
                                           }]),
           
                },
            },
            barWidth: 15,
            data: getmyd
        },
        {
            name: '背景',
            type: 'bar',
            barWidth: 15,
            barGap: '-100%',
            data: getmydzd,
            itemStyle: {
                normal: {
                    color: 'rgba(103,150,253,0.3)',
                    barBorderRadius: 0,
                }
            },
        },
    ]
};
myChart_ph.setOption(option_ph);