-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
g2 v5版本折线图(line) 设置shape为smooth(曲线)后,对于中间出现连续0的场景画线异常 #5541
Comments
目前曲线是用 d3-line 绘制的,传递参数的能力缺失。 |
谢谢大佬们 |
问下,什么版本会优化这个呀 |
看了一下,这里有两种处理方法,第一种: // 设置 alpha 参数,效果会好很多
chart.line().style('shape', 'smooth').style('alpha', 1); 第二种,使用 d3 的 curveMonotoneX 曲线生成器: import { curveMonotoneX } from 'd3-shape';
chart.line().style('shape', 'smooth').style('curve', () => curveMonotoneX) |
对,应该是一类问题 |
我试了下上面的方案,对我现在成图都不太友好,大改多久能修复呢 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述:
我实现了一个简单的折线图,用平滑的曲线画线,但是在中间遇到连续的0(先升后降再升场景)时,发现v5下的版本存在问题,想求助下是我v5配置的问题,还是v5就存在这样的问题(sorry, 文档阅读了半天,没找到什么有用信息,感觉v5文档看api稍微难理解)
这是之前v4版本下的样式截图:
这是我在v5版本下的样式截图
The text was updated successfully, but these errors were encountered: