question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Xalio08commented, Feb 27, 2019

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

0reactions
github-actions[bot]commented, Sep 11, 2021

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

yAxis splitLine interval: function(index, val) {} doesn't work
The function specified for interval property is not get invoked in case of value axis.
Read more >
ECharts - Getting a single splitLine to render in a stacked ...
The way I ended up resolving this is: var option = { tooltip: { trigger: 'item', axisPointer: { type: 'shadow' } }, legend:...
Read more >
Documentation - Apache ECharts
If the top value is set to be 'top' , 'middle' , or 'bottom' , then the component will be aligned automatically based...
Read more >
opts
BarCategoryGap string // Index of x axis to combine with, which is useful for multiple x axes in one chart. XAxisIndex int //...
Read more >
Scatter charts - Google Docs Editors Help
Scatter charts show numeric coordinates along the horizontal (X) and vertical (Y) axes. Use a scatter chart when you want to find out...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found