echarts图表y轴数据设置为固定值,等间距

如图 将Y轴 设置为固定的0% 20% ----100%

                yAxis: {
                    type: 'value',
                    max: 100,//最大值
                    min: 0,//最小值
                    interval:20,//间隔
                    axisLine:{
                        show: false,
                        lineStyle:{
                            color:'#d9e1e4'
                        },
                    },
                    axisLabel:{
                        color:'#4e5b5f',
                        formatter: function (val) {//百分比显示
                            return val + '%';
                        }
                    },
                    axisTick:{
                        show:false,
                    },
                    splitLine:{
                        lineStyle:{
                            type:'dashed'
                        }
                    }
 
                },

posted @ 2022-10-19 14:09  ZerlinM  阅读(1909)  评论(0)    收藏  举报