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

Uncaught TypeError: data.map is not a function #3821

Closed
lucifer1024 opened this issue Aug 10, 2016 · 2 comments
Closed

Uncaught TypeError: data.map is not a function #3821

lucifer1024 opened this issue Aug 10, 2016 · 2 comments

Comments

@lucifer1024
Copy link

问题简述:

$.get('data/lines-bus.json', function(data) {
var hStep = 300 / (data.length - 1);
var busLines = [].concat.apply([], data.map(function(busLine,idx) {}
浏览器抛出异常: Uncaught TypeError: data.map is not a function

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version): 3.2.2
  • 浏览器类型和版本 (Browser version): Chrome 52.0.2743.82 m (64-bit)
  • 操作系统类型和版本 (OS Version): Win7 64bit

重现步骤 (Steps to reproduce)

1.参照 https://github.com/ecomfe/echarts/blob/master/test/lines-bus.html 实现

期望结果 (Expected behaviour)

实例中的 北京公交路线 - 百度地图 http://echarts.baidu.com/demo.html#lines-bmap-bus

可能哪里有问题 (What went wrong)

ECharts配置项 (ECharts option)

option = {

}

其他信息 (Other comments)

@pissang
Copy link
Contributor

pissang commented Aug 10, 2016

改成 $.getJSON

@pissang pissang closed this as completed Aug 10, 2016
@lucifer1024
Copy link
Author

可以了,多谢!

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