You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/01/19 16:52:07 UTC

[GitHub] [incubator-echarts] KLordy opened a new issue #12093: 官网例子绘图显示报错

KLordy opened a new issue #12093: 官网例子绘图显示报错
URL: https://github.com/apache/incubator-echarts/issues/12093
 
 
   ### Version
   4.6.0
   
   ### Steps to reproduce
   1. idea创建springboot项目;
   2. static/js目录下导入echarts.min.js
   3. 依据官网用例编写对应html5文件在项目的template目录下
   4. 编写controller测试方法请求对应html5文件
   5. chrome访问对应接口。
   
   ### What is expected?
   显示对应柱状图
   
   ### What is actually happening?
   请求html成功,但是对于的柱状图未显示,对应DOM容器为空,
   
   ---
   chrome进行debug发现echarts初始化报错,进入js发现echarts.min.js文件的开头<!DOCTYPE html>申明处就报错了,这是会是因为版本兼容或是我哪里配置出了问题么?Chrome为最新版本:79.0.3945.130 。
   console处报错: 
   ```
   Uncaught SyntaxError: Unexpected token '<'
   (index):14 Uncaught ReferenceError: echarts is not defined
       at (index):14
   VM38:1 版本: 3.128 null
   ```
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] zhouxin860114 edited a comment on issue #12093: 官网例子绘图显示报错

Posted by GitBox <gi...@apache.org>.
zhouxin860114 edited a comment on issue #12093: 官网例子绘图显示报错
URL: https://github.com/apache/incubator-echarts/issues/12093#issuecomment-591795980
 
 
   > > > > 您好,`echarts.min.js` 文件里面不可能有 `<!DOCTYPE html>`,有点不太清楚你是怎么用的。
   > > > 
   > > > 
   > > > 另外,我用了别人提供的老版本的`echarts.min.js`文件替换了我下载的github上的`echarts.min.js`,然后就绘图成功了,是因为我上面说的从github仓库直接下载`echarts.min.js`方式不对么?github上下载的需要自己手动build么? 问题有点多不好意思哈...
   > > 
   > > 
   > > 
   > > 1. 按理说下载的方式是没问题的,你应该是从官网过去的。你可以重新再下载一遍试下么,我担心是因为被墙下载不完全导致的。2. 不需要构建了,dist  目录下就是构建后的产物。
   > 
   > 十分感谢答复~ 新版尝试了重新下载还是不行,已经使用久版本的echarts.min.js测试完成了~
   
   作为一个 git 萌新,表示也这么下载过 echarts,这 url 对应的就是个网页啊,哈哈哈~~~
   ![image](https://user-images.githubusercontent.com/8022228/75416104-6984c080-5968-11ea-8bbd-ee37eab2c5e7.png)
   
   ```
   [root@bogon ~]# wget https://github.com/apache/incubator-echarts/blob/4.6.0/dist/echarts.min.js
   --2020-02-27 13:53:00--  https://github.com/apache/incubator-echarts/blob/4.6.0/dist/echarts.min.js
   Resolving github.com (github.com)... 
   
   52.74.223.119
   Connecting to github.com (github.com)|52.74.223.119|:443... connected.
   HTTP request sent, awaiting response... 200 OK
   Length: unspecified [text/html]
   Saving to: ‘echarts.min.js’
   
       [                                                                <=>                                                                                                                                ] 952,569     33.1KB/s   in 22s    
   
   2020-02-27 13:53:34 (43.0 KB/s) - ‘echarts.min.js’ saved [952569]
   
   [root@bogon ~]# 
   [root@bogon ~]# 
   [root@bogon ~]# more echarts.min.js 
   
   <!DOCTYPE html>
   <html lang="en">
     <head>
       <meta charset="utf-8">
   ........................................
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] Ovilia edited a comment on issue #12093: 官网例子绘图显示报错

Posted by GitBox <gi...@apache.org>.
Ovilia edited a comment on issue #12093: 官网例子绘图显示报错
URL: https://github.com/apache/incubator-echarts/issues/12093#issuecomment-591799853
 
 
   @KLordy 不能直接保存这个网页,需要点击 raw 然后再保存
   <img width="1133" alt="屏幕快照 2020-02-27 14 03 07" src="https://user-images.githubusercontent.com/779050/75416791-4824d400-596a-11ea-80d6-c5d7eaabacca.png">
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] KLordy commented on issue #12093: 官网例子绘图显示报错

Posted by GitBox <gi...@apache.org>.
KLordy commented on issue #12093: 官网例子绘图显示报错
URL: https://github.com/apache/incubator-echarts/issues/12093#issuecomment-582906210
 
 
   > > > 您好,`echarts.min.js` 文件里面不可能有 `<!DOCTYPE html>`,有点不太清楚你是怎么用的。
   > > 
   > > 
   > > 另外,我用了别人提供的老版本的`echarts.min.js`文件替换了我下载的github上的`echarts.min.js`,然后就绘图成功了,是因为我上面说的从github仓库直接下载`echarts.min.js`方式不对么?github上下载的需要自己手动build么? 问题有点多不好意思哈...
   > 
   > 1. 按理说下载的方式是没问题的,你应该是从官网过去的。你可以重新再下载一遍试下么,我担心是因为被墙下载不完全导致的。2. 不需要构建了,dist  目录下就是构建后的产物。
   
   十分感谢答复~ 新版尝试了重新下载还是不行,已经使用久版本的echarts.min.js测试完成了~ 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12093: 官网例子绘图显示报错

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #12093: 官网例子绘图显示报错
URL: https://github.com/apache/incubator-echarts/issues/12093#issuecomment-576023753
 
 
   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions.
   
   If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] Ovilia closed issue #12093: 官网例子绘图显示报错

Posted by GitBox <gi...@apache.org>.
Ovilia closed issue #12093: 官网例子绘图显示报错
URL: https://github.com/apache/incubator-echarts/issues/12093
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] zhouxin860114 commented on issue #12093: 官网例子绘图显示报错

Posted by GitBox <gi...@apache.org>.
zhouxin860114 commented on issue #12093: 官网例子绘图显示报错
URL: https://github.com/apache/incubator-echarts/issues/12093#issuecomment-591795980
 
 
   > > > > 您好,`echarts.min.js` 文件里面不可能有 `<!DOCTYPE html>`,有点不太清楚你是怎么用的。
   > > > 
   > > > 
   > > > 另外,我用了别人提供的老版本的`echarts.min.js`文件替换了我下载的github上的`echarts.min.js`,然后就绘图成功了,是因为我上面说的从github仓库直接下载`echarts.min.js`方式不对么?github上下载的需要自己手动build么? 问题有点多不好意思哈...
   > > 
   > > 
   > > 
   > > 1. 按理说下载的方式是没问题的,你应该是从官网过去的。你可以重新再下载一遍试下么,我担心是因为被墙下载不完全导致的。2. 不需要构建了,dist  目录下就是构建后的产物。
   > 
   > 十分感谢答复~ 新版尝试了重新下载还是不行,已经使用久版本的echarts.min.js测试完成了~
   
   作为一个 git 萌新,表示也这么下载过 echarts,这 url 对应的就是个网页啊,哈哈哈~~~
   ![image](https://user-images.githubusercontent.com/8022228/75416104-6984c080-5968-11ea-8bbd-ee37eab2c5e7.png)
   
   `[root@bogon ~]# wget https://github.com/apache/incubator-echarts/blob/4.6.0/dist/echarts.min.js
   --2020-02-27 13:53:00--  https://github.com/apache/incubator-echarts/blob/4.6.0/dist/echarts.min.js
   Resolving github.com (github.com)... 
   
   52.74.223.119
   Connecting to github.com (github.com)|52.74.223.119|:443... connected.
   HTTP request sent, awaiting response... 200 OK
   Length: unspecified [text/html]
   Saving to: ‘echarts.min.js’
   
       [                                                                <=>                                                                                                                                ] 952,569     33.1KB/s   in 22s    
   
   2020-02-27 13:53:34 (43.0 KB/s) - ‘echarts.min.js’ saved [952569]
   
   [root@bogon ~]# 
   [root@bogon ~]# 
   [root@bogon ~]# more echarts.min.js 
   
   
   
   
   
   
   <!DOCTYPE html>
   <html lang="en">
     <head>
       <meta charset="utf-8">
   ........................................`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] zhouxin860114 edited a comment on issue #12093: 官网例子绘图显示报错

Posted by GitBox <gi...@apache.org>.
zhouxin860114 edited a comment on issue #12093: 官网例子绘图显示报错
URL: https://github.com/apache/incubator-echarts/issues/12093#issuecomment-591795980
 
 
   > > > > 您好,`echarts.min.js` 文件里面不可能有 `<!DOCTYPE html>`,有点不太清楚你是怎么用的。
   > > > 
   > > > 
   > > > 另外,我用了别人提供的老版本的`echarts.min.js`文件替换了我下载的github上的`echarts.min.js`,然后就绘图成功了,是因为我上面说的从github仓库直接下载`echarts.min.js`方式不对么?github上下载的需要自己手动build么? 问题有点多不好意思哈...
   > > 
   > > 
   > > 
   > > 1. 按理说下载的方式是没问题的,你应该是从官网过去的。你可以重新再下载一遍试下么,我担心是因为被墙下载不完全导致的。2. 不需要构建了,dist  目录下就是构建后的产物。
   > 
   > 十分感谢答复~ 新版尝试了重新下载还是不行,已经使用久版本的echarts.min.js测试完成了~
   
   作为一个 git 萌新,表示也这么下载过 echarts,这 url 对应的就是个网页啊,哈哈哈~~~
   ![image](https://user-images.githubusercontent.com/8022228/75416104-6984c080-5968-11ea-8bbd-ee37eab2c5e7.png)
   
   ```[root@bogon ~]# wget https://github.com/apache/incubator-echarts/blob/4.6.0/dist/echarts.min.js
   --2020-02-27 13:53:00--  https://github.com/apache/incubator-echarts/blob/4.6.0/dist/echarts.min.js
   Resolving github.com (github.com)... 
   
   52.74.223.119
   Connecting to github.com (github.com)|52.74.223.119|:443... connected.
   HTTP request sent, awaiting response... 200 OK
   Length: unspecified [text/html]
   Saving to: ‘echarts.min.js’
   
       [                                                                <=>                                                                                                                                ] 952,569     33.1KB/s   in 22s    
   
   2020-02-27 13:53:34 (43.0 KB/s) - ‘echarts.min.js’ saved [952569]
   
   [root@bogon ~]# 
   [root@bogon ~]# 
   [root@bogon ~]# more echarts.min.js 
   
   <!DOCTYPE html>
   <html lang="en">
     <head>
       <meta charset="utf-8">
   ........................................```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] deqingli commented on issue #12093: 官网例子绘图显示报错

Posted by GitBox <gi...@apache.org>.
deqingli commented on issue #12093: 官网例子绘图显示报错
URL: https://github.com/apache/incubator-echarts/issues/12093#issuecomment-576528727
 
 
   > > 您好,`echarts.min.js` 文件里面不可能有 `<!DOCTYPE html>`,有点不太清楚你是怎么用的。
   > 
   > 另外,我用了别人提供的老版本的`echarts.min.js`文件替换了我下载的github上的`echarts.min.js`,然后就绘图成功了,是因为我上面说的从github仓库直接下载`echarts.min.js`方式不对么?github上下载的需要自己手动build么? 问题有点多不好意思哈...
   
   1. 按理说下载的方式是没问题的,你应该是从官网过去的。你可以重新再下载一遍试下么,我担心是因为被墙下载不完全导致的。2. 不需要构建了,dist  目录下就是构建后的产物。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] Ovilia commented on issue #12093: 官网例子绘图显示报错

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #12093: 官网例子绘图显示报错
URL: https://github.com/apache/incubator-echarts/issues/12093#issuecomment-591799853
 
 
   @KLordy 不能直接报错这个网页,需要点击 raw 然后再保存
   <img width="1133" alt="屏幕快照 2020-02-27 14 03 07" src="https://user-images.githubusercontent.com/779050/75416791-4824d400-596a-11ea-80d6-c5d7eaabacca.png">
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] KLordy commented on issue #12093: 官网例子绘图显示报错

Posted by GitBox <gi...@apache.org>.
KLordy commented on issue #12093: 官网例子绘图显示报错
URL: https://github.com/apache/incubator-echarts/issues/12093#issuecomment-576178275
 
 
   > 您好,`echarts.min.js` 文件里面不可能有 `<!DOCTYPE html>`,有点不太清楚你是怎么用的。
   
   另外,我用了别人提供的老版本的`echarts.min.js`文件替换了我下载的github上的`echarts.min.js`,然后就绘图成功了,是因为我上面说的从github仓库直接下载`echarts.min.js`方式不对么?github上下载的需要自己手动build么? 问题有点多不好意思哈...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] deqingli commented on issue #12093: 官网例子绘图显示报错

Posted by GitBox <gi...@apache.org>.
deqingli commented on issue #12093: 官网例子绘图显示报错
URL: https://github.com/apache/incubator-echarts/issues/12093#issuecomment-576131692
 
 
   您好,`echarts.min.js`  文件里面不可能有 `<!DOCTYPE html>`,有点不太清楚你是怎么用的。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] KLordy commented on issue #12093: 官网例子绘图显示报错

Posted by GitBox <gi...@apache.org>.
KLordy commented on issue #12093: 官网例子绘图显示报错
URL: https://github.com/apache/incubator-echarts/issues/12093#issuecomment-576175532
 
 
   > 您好,`echarts.min.js` 文件里面不可能有 `<!DOCTYPE html>`,有点不太清楚你是怎么用的。
   你好~ 我是直接下载的https://github.com/apache/incubator-echarts/tree/4.6.0/dist 里的`echarts.min.js`直接存储到对应项目路径,然后引用的html如下:
   ```
   <!DOCTYPE html>
   <html lang="en">
   <head>
       <meta charset="UTF-8" />
       <title>Title</title>
       <script src="js/echarts.min.js"></script>
   </head>
   <body>
   <div id="main" style="width: 600px;height:400px;"></div>
   <script type="text/javascript">
       // 基于准备好的dom,初始化echarts实例  -- MARK 这一行初始化echarts报错了!!
       var myChart = echarts.init(document.getElementById('main'));
   
       // 指定图表的配置项和数据
       var option = {
           title: {
               text: 'ECharts 入门示例'
           },
           tooltip: {},
           legend: {
               data:['销量']
           },
           xAxis: {
               data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
           },
           yAxis: {},
           series: [{
               name: '销量',
               type: 'bar',
               data: [5, 20, 36, 10, 10, 20]
           }]
       };
   
       // 使用刚指定的配置项和数据显示图表。
       myChart.setOption(option);
   </script>
   <p>测试mark</p>
   </body>
   </html>
   ```
   请问是我下载的文件不对么?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] shuish0071 commented on issue #12093: 官网例子绘图显示报错

Posted by GitBox <gi...@apache.org>.
shuish0071 commented on issue #12093:
URL: https://github.com/apache/incubator-echarts/issues/12093#issuecomment-667041356


   
   
   
   > @KLordy 不能直接保存这个网页,需要点击 raw 然后再保存
   > <img alt="屏幕快照 2020-02-27 14 03 07" width="1133" src="https://user-images.githubusercontent.com/779050/75416791-4824d400-596a-11ea-80d6-c5d7eaabacca.png">
   
   就是因为被墙导致下载不完全,感谢老哥提供的下载方法!!!
   解决了我的报错


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org