欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

echart效果图配置1

程序员文章站 2024-03-20 08:37:04
...

echart效果图配置1

option = {
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: [0,1,2,3,4,5,6,7,8,9,10,11,12],
        axisLine:{
            show: true,
            lineStyle:{
                color: '#aaa',
            }
        },
        axisTick: {
            show:false,
        },
        axisLabel:{
            show: true,
            
        }
    },

    tooltip:{
        show:true,
        trigger:'axis',
        showContent: true,
        formatter: '2020年{b}月<br />{c}人',
        backgroundColor: '#fff',
        borderColor: '#aaa',
        padding: [5,10],
        textStyle:{
            color: '#000',
            fortFamily: 'PingFang-SC-Medium' ,
            extraCssText: 'border-bottom: 2px solid #CFE3F4', 
        },
        axisPointer: {
            type: 'cross',
            snap: true,
        }
    },
    yAxis: {
        type: 'value',
        minInterval:100,
    },
    series: [{
        data: [0,50,200, 300,70,75,105,135,175,180,95,75,130],
        type: 'line',
        smooth: true,
        symbolSize:8,
        lineStyle: {
            width:5,
        },
        itemStyle: {
                color: '#7BB0FF'
            },
            areaStyle: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                    offset: 0,
                    color: '#7BB0FF'
                }, {
                    offset: 1,
                    color: '#fff'
                }])
            },
    }]
};

 

相关标签: 前端 echarts