Echarts折线图样式之 option配置

先看效果:

再上代码:

 option: {
                // 显示图例
                legend: {
                    show: true,
                    left: 'center', // 水平居中对齐
                    icon: 'rect', //改变图例图形为线性
                    itemWidth: 25,
                    itemHeight: 3,
                    itemGap: 20 //每个图例之间的间隔
                },
                toolbox: {
                    show: false // 不显示工具栏
                },
                color: ['#2ad9ff', '#ffb368'], // 线条颜色
                yAxis: {
                    name: '万条',
                    nameGap: 30, //坐标轴名称与轴线之间的距离
                    axisLine: {
                        show: false //不显示y轴
                    },
                    axisTick: {
                        show: false // 不显示刻度线
                    },
                    splitLine: { //y轴分割线
                        show: true,
                        lineStyle: {
                            type: 'dashed',
                            color: '#016398'
                        }
                    }
                },
                series: [
                    {
                        type: 'line',
                        smooth: 1, // 平缓曲线 取值0-1
                        areaStyle:{ }//显示线条包裹的区域颜色  
                    },
                    {
                        type: 'line',
                        smooth: true
                    }
                ]
            }

猜你喜欢

转载自blog.csdn.net/A_Common_Man/article/details/126562864