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

可以画多点线段吗? #6

Open
longroad1128 opened this issue May 12, 2017 · 2 comments
Open

可以画多点线段吗? #6

longroad1128 opened this issue May 12, 2017 · 2 comments

Comments

@longroad1128
Copy link

目前线条都只能由起点与终点画出线段,很不方便,echart推出了polyline属性,可以画多点线段,不知道能不能用插件实现多点线段

@jindin
Copy link

jindin commented Aug 9, 2017

我在使用过程中也遇到了。在模仿例子 北京公交网的例子时,公交数据的坐标组织和echarts 3.2.0版不一致。 3.2.0后坐标组织成以下情况:
`注: 为了更好点支持多段线的配置,线数据的格式在 3.2.0 做了一定调整,如下:

// 3.2.0 之前
// [{
// // 起点坐标
// coord: [120, 66],
// lineStyle: { normal: {} }
// }, {
// // 终点坐标
// coord: [122, 67]
// }]

// 从 3.2.0 起改为如下配置
{
coords: [
[120, 66], // 起点
[122, 67] // 终点
... // 如果 polyline 为 true 还可以设置更多的点
],
// 统一的样式设置
lineStyle: {
normal: {}
}
}`

@ghost
Copy link

ghost commented May 15, 2018

模仿北京交通网的代码还有吗?可不可以给个DEMO,我也在做,学习一下

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