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

yAxis.splitLine.interval:function(idx,val){ }) 不执行 #3257

Closed
Zendic opened this issue May 21, 2016 · 3 comments
Closed

yAxis.splitLine.interval:function(idx,val){ }) 不执行 #3257

Zendic opened this issue May 21, 2016 · 3 comments

Comments

@Zendic
Copy link

Zendic commented May 21, 2016

问题简述 (One-line summary)

文档中说明的 interval 参数无效
yAxis.splitLine.interval:function(idx,val){ }) 并不会执行。

另外还有个问题:设置 OPTION.TEXTSTYLE 似乎对文本样式不会产生任何影响

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version): 3.1.10
  • 浏览器类型和版本 (Browser version): 360/极速模式
  • 操作系统类型和版本 (OS Version):Windows7 sp1 64bit

重现步骤 (Steps to reproduce)

期望结果 (Expected behaviour)

可能哪里有问题 (What went wrong)

ECharts配置项 (ECharts option)

var myChart = echarts.init(document.getElementById('main'));

//模拟数据
var data = [];
var time = [];
var data = [];
var data2 = [];
for(var i= 0;i<=72;i++)
{
    time.push(i);
    data.push( Math.round((Math.random()*100)*1000));
    data2.push( Math.round((Math.random()*100)*200));
}

//
option = {
   yAxis: {
        type: 'value',
        position:'left',
        max:100000,
        splitLine:{interval:function(idx1,val1){
          //疑问点,yAxis.splitLine.interval 貌似并不执行
         console.log(idx1);
         return true;
        }},
        axisLine:{show:false} ,   
        axisTick:{show:false},

    },


    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: time,
        axisLabel:{ margin:20,textStyle:{ color:'#7a8a9a'}},
    },


    series: 
    [
        {
            type:'line',
            data: data
        },
        {
            type:'line',
            data: data2
        }
    ]

};
myChart.setOption(option);

其他信息 (Other comments)

@pissang
Copy link
Contributor

pissang commented May 21, 2016

数值轴不支持设置 splitLine.interval

@pissang pissang closed this as completed May 21, 2016
@amittonge
Copy link

I would be better if echart support setting splitLine.interval for value axis also.

@towry
Copy link

towry commented May 16, 2020

的确有这样的需求。或者由其他替代方案吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants