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

曲线折线图有什么方法可以让它一张图上出现两根线 #103

Closed
JulesCesar opened this issue May 7, 2018 · 5 comments
Closed

Comments

@JulesCesar
Copy link

image
比如这样。但是我用了实际收益和预期收益对比这张图。但是我如果拿掉data里的时间的话 图表就会错乱比如这样
image
有什么配置方法是配置两根线的呢?

@simaQ
Copy link
Contributor

simaQ commented May 7, 2018

https://antv.alipay.com/zh-cn/f2/3.x/demo/line/shapes.html 拿这个例子来说吧,之所以会出现两条线,是因为我们根据 type 值数据进行了分组, .color('type') 用颜色进行分组,你按照这个思路就可以绘制出两根线了

image
image

@JulesCesar
Copy link
Author

image
两根线我这哪里整错了呀😷
image
image

@JulesCesar
Copy link
Author

image
想让这俩点点显示的 Legend吗?有没有具体的方法?因为我放了下没显示是还缺什么配置文件吗?我是npm进工程的缺东西?

@simaQ
Copy link
Contributor

simaQ commented May 7, 2018

亲,能贴下你的图表数据的结构么?

@JulesCesar
Copy link
Author

已解决

@simaQ simaQ closed this as completed May 8, 2018
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