echarts icon indicating copy to clipboard operation
echarts copied to clipboard

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

Open sunnyShining opened this issue 8 years ago • 6 comments

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 [其他信息]



sunnyShining avatar Dec 21 '17 03:12 sunnyShining

请具体描述你的问题

pissang avatar Dec 21 '17 05:12 pissang

已详细描述

sunnyShining avatar Dec 21 '17 07:12 sunnyShining

The function specified for interval property is not get invoked in case of value axis.

amittonge avatar Apr 12 '18 05:04 amittonge

Why ? It would be really useful for time intervals, which are not the same depending on the month.

Xalio08 avatar Feb 27 '19 09:02 Xalio08

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] avatar Sep 03 '21 21:09 github-actions[bot]

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

github-actions[bot] avatar Sep 11 '21 21:09 github-actions[bot]