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轴的竖线以及怎样有一点偏移? #3419

Closed
kaixin3946 opened this issue Jun 14, 2016 · 4 comments
Closed

Comments

@kaixin3946
Copy link

①现在是这样的:
image
我希望是这样的:
image
但是目前没有找到这样的属性啊,有什么办法吗~
②我希望两条折线不完全重合,就是有一点偏移,现在这样:
image
这里两条线第一段红黑两条线重合了,而我希望是这样:
image
就是两条线稍微有一点偏移

求教大神~~
我用的是echart v3.1.10 。

@pissang
Copy link
Contributor

pissang commented Jun 14, 2016

1 不行,2 没懂

@kaixin3946
Copy link
Author

好的,感谢回复~
关于问题一,我还想问下 series→{type:line}→data→itemStyle→normal→barBorderCorlor、barBorderWidth这两个属性是什么意思,柱条的描边颜色,说的不是单个点到X轴的柱条是什么呢?
image
问题二:正常折线图的两份数据,即:series:{{name:"name1",data:[]},{name:"name2",data:[]}},这样写画出来的图形是
image
在这里,周一和周二两天里这两条线重合了,我希望第二条线可以设置一个初始的X轴值,让他不是0,而是1或者1.1,这样避开第一条线的宽度让两条折线以及折线点到X轴折线都可以显示~

想要实现的效果图:
image

谢谢~

@pissang
Copy link
Contributor

pissang commented Jun 15, 2016

第一抱歉是文档错误,itemStyle 是折线图拐点的样式,可选配置项见 http://echarts.baidu.com/option.html#series-line.itemStyle.normal

第二点通过配置项无法做到偏移,建议红色用一条更宽的折线防止被蓝色折线遮挡,具体可以设置 http://echarts.baidu.com/option.html#series-line.lineStyle.normal.width

@kaixin3946
Copy link
Author

好哒,知道啦~非常感谢~~

@pissang pissang closed this as completed Jul 9, 2016
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