image.png

    option = {
    backgroundColor: ‘transparent’,
    grid: {
    left: ‘6%’,
    right: ‘20px’,
    bottom: ‘30px’,
    top:’10%’,
    containLabel: true,
    },
    xAxis: [
    {
    type: ‘category’,
    data: [‘2016年’, ‘2017年’, ‘2018年’, ‘2019年’, ‘2020年’, ‘2021年’],
    axisLabel: { //坐标轴刻度标签的相关设置。
    _textStyle: {
    color: ‘#577A94’,
    fontStyle: ‘normal’,
    fontFamily: ‘微软雅黑’,
    fontSize: 12,
    },
    // rotate:-50,
    interval:0, // 横坐标全显示
    },
    axisTick:{
    //坐标轴刻度相关设置。
    show: false,
    },
    axisLine:{
    //坐标轴轴线相关设置
    lineStyle:{
    color: ‘#2D313C’,
    }
    },
    splitLine: {
    //坐标轴在 grid 区域中的分隔线。
    _show: false,
    }
    }
    ],
    yAxis: [
    {
    type: ‘value’,
    splitNumber: 5,
    axisLabel: {
    textStyle: {
    color: ‘#577A94’,
    fontStyle: ‘normal’,
    fontFamily: ‘微软雅黑’,
    fontSize: 12,
    }
    },
    axisLine:{
    show: true,
    lineStyle:{
    color: ‘#2D313C’,
    }
    },
    axisTick:{
    show: false
    },
    splitLine: {
    show: true,
    lineStyle: {
    color: ‘#2D313C’,
    }
    }

    1. }<br /> ],<br /> legend: { _// 图例<br /> _data: ['出境', '入境'],<br /> right:'20',<br /> itemWidth: 15,<br /> itemHeight :5,<br /> textStyle: {<br /> color: "#577A94",<br /> }<br /> },<br /> series : [<br /> {<br /> name:'出境',<br /> type:'bar',<br /> data:[670,200, 500,1100, 200, 900],<br /> barWidth: 10,<br /> barGap:0.5,_//柱间距离<br /> _itemStyle: {<br /> normal: {<br /> show: true,<br /> color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{<br /> offset: 0,<br /> color: '#68C7FF'<br /> }, {<br /> offset: 1,<br /> color: '#387FFF'<br /> }]),<br /> _// barBorderRadius: 50,<br /> _borderWidth: 0,<br /> }<br /> },<br /> },<br /> {<br /> name:'入境',<br /> type:'bar',<br /> data:[500,300, 300, 700, 100, 700],<br /> barWidth: 10,<br /> barGap:0.5,_//柱间距离<br /> _itemStyle: {<br /> normal: {<br /> show: true,<br /> color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{<br /> offset: 0,<br /> color: '#50F289'<br /> }, {<br /> offset: 1,<br /> color: '#1C8D3F'<br /> }]),<br /> _// barBorderRadius: 50,<br /> _borderWidth: 0,<br /> }<br /> },<br /> }<br /> ]<br />};