[echarts] overflow of the x-axis in echarts

Overflow of x-axis in echarts

var option = {
    
    
    backgroundColor: '#051c71',
    //重点 dataZoom导航条
    dataZoom: [{
    
    
        type: 'slider',
        show: true,
        startValue: 0,
        endValue: 5,
        height: '15',
        bottom: '3%',
        zoomLock: true
    }],
    tooltip: {
    
    
        trigger: "axis",
        backgroundColor: 'rgb(11,11,81)',
        padding: [15,30],
        extraCssText: 'box-shadow: 0px 0px 25px 5px rgb(41, 95, 159) inset;border-radius:10px'
    },
    legend: {
    
    
        show: true,
        top: '5%',
        textStyle: {
    
    
            color: "#fff"
        },
        data: ["数量", "金额"]
    },
    grid: {
    
    
        top: '20%',
        left: "3%",
        right: "4%",
        bottom: "13%",
        containLabel: true
    },
    xAxis: {
    
    
  	    type: "category",
      	axisTick: {
    
    
      		show: false
      	},
      	axisLabel: {
    
    
      		//"rotate": 30, 设置角度旋转
      		interval: 0,
      		color: '#ddd',
      		fontSize: 14
      	},
      	axisLine: {
    
    
      		lineStyle: {
    
    
      			color: "#5475c8"
      		}
      	},
      	data: ["1月", "2月", "3月", "4月", 
      	"5月", "6月", "7月", "8月", 
      	"9月", "10月", "11月", 
      	"12月", "1月", "2月", 
      	"3月", "4月"]
    },
    yAxis: [],
    series: [{
    
    
      	name: "数量",
      	type: "bar",
      	barWidth: 15,
      	label: {
    
    
      		normal: {
    
    
      			show: false,
      			position: "insideRight"
      		}
      	},
      	itemStyle: {
    
    
      		normal: {
    
    
      			color:  new echarts.graphic.LinearGradient(
                0, 0, 0, 1,
                [
                    {
    
    offset: 0, color: 'rgb(61, 207, 255)'},
                    {
    
    offset: 0.5, color: 'rgb(61, 207, 255)'},
                    {
    
    offset: 1, color: 'rgba(61, 207, 255, 0.1)'}
                ]
            ),
      		}
      	},
      	data: [10, 7, 15, 8, 6, 2, 1, 3]
    }, {
    
    
      	name: "金额",
      	type: "line",
      	yAxisIndex: 1,
      	smooth: false,
      	showAllSymbol: true,
      	symbol: "circle",
      	symbolSize: 10,
      	itemStyle: {
    
    
      		color: "rgb(253,146,166)"
      	},
      	lineStyle: {
    
    
      		color: "rgb(253,146,166)"
      	},
      	data: [3300, 1000, 1600, 3000, 4000, 2000, 1020, 1500]
    }]
};

Guess you like

Origin blog.csdn.net/liqiannan8023/article/details/130111486
Recommended