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: zrUtil.eqNaN is not a function” #4850

Closed
zerogog opened this issue Jan 3, 2017 · 2 comments

Comments

@zerogog
Copy link

zerogog commented Jan 3, 2017

One-line summary [问题简述]

之前提到过无法控制K线图的柱宽,详情可查看问题#4783
问题修改后,我下载整个项目,试图在本地重新编译生成最新版本。
成功生成之后,在html上直接引入文件时,报错:Uncaught TypeError: zrUtil.eqNaN is not a function
尝试查找问题原因,发现在引用 echarts\node_modules\zrender\lib\core\util.js 后,并没有在该文件中找到eqNaN这个函数的定义。

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:当前项目最新版本,克隆时间2017/1/3 17:56
  • Browser version [浏览器类型和版本]:chrome 55
  • OS Version [操作系统类型和版本]:win7

Expected behaviour [期望结果]

编译后的文件能正式运行

ECharts option [出错位置]

//zrUtil.eqNaN is not a functuion
if (baseAxis.isBlank() || zrUtil.eqNaN(point[0]) || zrUtil.eqNaN(point[1])) {
	this._hideAxisPointer(coordSys.name);
	return;
}

Other comments [其他信息]

@pissang
Copy link
Contributor

pissang commented Jan 3, 2017

echarts 的代码版本跟 zrender 不同步,如果 echarts 的代码是 github 上最新的,zrender 也需要是

@pissang pissang closed this as completed Jan 3, 2017
@zerogog
Copy link
Author

zerogog commented Jan 4, 2017

谢谢,问题已解决

本地zrender模块是通过npm安装的,根据配置项,安装的是3.2.2echarts\node_modules\zrender\lib\core\util.js文件中本没有eqNaN函数的定义,下载zrender模块master分支之后,比对这两个版本的util.js文件,确实存在差异。将echarts中的zrender替换为该版本之后,问题得到解决。

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