Skip to content

yAxis splitLine interval: function(index, val) {} doesn't work #7336

@sunnyShining

Description

@sunnyShining

One-line summary [问题简述]

在使用折线图时,想发现纵轴横线过于密集,想通过yAxis.splitLine.interval使线条变少,发现使用函数不能执行

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 3.8.4
  • Browser version [浏览器类型和版本]: all
  • OS Version [操作系统类型和版本]: all

Expected behaviour [期望结果]

纵轴横线过于密集,希望通过配置使横线变少

ECharts option [ECharts配置项]

// 部分配置信息如下,console不打印index
option = {
	yAxis: {
                    axisTick: {
                        show: false,
                    },
                    axisLine: {
                        show: false,
                    },
                    splitLine: {
                        show: true,
                        lineStyle: {
                            color: '#ddd',
                            width: 1,
                            type: 'solid'
                        },
                        interval: function(index, val) {
                            console.log(index);
                            return val;
                        }
                    },
	}

Other comments [其他信息]

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleInactive for a long time. Will be closed in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions