Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X轴上的分割线splitLine属性interval formatter函数控制显示错误 #9154

Closed
junHaiBuilder-one opened this issue Sep 30, 2018 · 4 comments
Assignees
Labels
enhancement stale Inactive for a long time. Will be closed in 7 days.

Comments

@junHaiBuilder-one
Copy link

junHaiBuilder-one commented Sep 30, 2018

One-line summary [问题简述]

直角坐标系下的X轴上的分割线splitLine属性interval使用formatter函数进行控制分割线显示不正确。

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: ECharts 4.10
  • Browser version [浏览器类型和版本]: chrome 版本 69.0.3497.100(正式版本) (32 位)
  • OS Version [操作系统类型和版本]: window 7

Expected behaviour [期望结果]

通过splitLine的进行上下双X轴的分组显示,如上X轴可以作为类目分组(如:地区),下X轴作为具体类目(如:省份),通过splitLine进行严格的分割线隔离。
预期分割线的formatter函数能够严格控制分割线的显示

ECharts option [ECharts配置项]

option = {
    xAxis: {
        type: 'category',
        splitLine:{
            show:true,
            // interval: 3
            interval: function(params, name){
                if(params == 0 || params == 6){
                    return true;
                }
                return false;
            }
        },
         axisTick:{
            show:true,
            interval: function(params, name){
               
                if(params == 4 || params == 5){
                    return true;
                }
                return false;
            }
        },
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        data: [120, 200, 150, 80, 70, 110, 130],
        type: 'bar'
    }]
};

Other comments [其他信息]

@Ovilia
Copy link
Contributor

Ovilia commented Oct 8, 2018

interval 支持函数形式可能技术层面不太好实现

@aloneWang
Copy link

等待修复。。。。

@github-actions
Copy link
Contributor

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 github-actions bot added the stale Inactive for a long time. Will be closed in 7 days. label Feb 11, 2022
@github-actions
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement stale Inactive for a long time. Will be closed in 7 days.
Projects
None yet
Development

No branches or pull requests

4 participants