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

关于grid的配置问题 #3365

Closed
PossibleMaybe opened this issue Apr 9, 2021 · 4 comments
Closed

关于grid的配置问题 #3365

PossibleMaybe opened this issue Apr 9, 2021 · 4 comments

Comments

@PossibleMaybe
Copy link

image
如何去掉和最下面的lindDash

@PossibleMaybe
Copy link
Author

不想要最下面的和横坐标重合的那个lineDash,如何去掉,在文档上没找到配置项
chart.axis('Value', {
grid: {
line: {
style: {
stroke: 'red',
lineWidth: 1,
lineDash: [2, 2],
},
},
},
});

@visiky
Copy link
Member

visiky commented Apr 10, 2021

可以使用回调的方式处理下,判断 0 刻度线

@PossibleMaybe
Copy link
Author

可以使用回调的方式处理下,判断 0 刻度线

可以详细点嘛,我去看了下文档,还是没看到哪个属性可以用回调方式

@PossibleMaybe
Copy link
Author

chart.axis('Value', {
grid: {
line: {
style: (points, val) => {
if(!val) return null;
return {lineDash: [2, 2], stroke: 'red'}
}
},
},
});
试了好久,这样写才行,但是在文档上上没看到这个style可以是函数,至于接收的参数只能靠猜

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

2 participants