1. 程式人生 > >Echarts 報錯:Uncaught Error: [MODULE_MISS]"echarts/config" is not exists!

Echarts 報錯:Uncaught Error: [MODULE_MISS]"echarts/config" is not exists!

問題:

報錯:Uncaught Error: [MODULE_MISS]"echarts/config" is not exists!

原因:

require(
    [
        'echarts',
        'echarts/chart/scatter'
    ],
    function (ec) {
        // 基於準備好的dom,初始化echarts圖表
        myScatter = ec.init(document.getElementById('mainScatter')); 

       。。。
        
    }
);
// 氣泡click事件
var ecConfig = require('echarts/config');
   myScatter.on(ecConfig.EVENT.CLICK, function(param){
   var mes = '【' + param.type + '】';
   alert(mes);
});

var ecConfig 定義沒有放到上面require([],function(){}) 裡面。放到裡面就ok了。

相關推薦

Echarts Uncaught Error: [MODULE_MISS]"echarts/config" is not exists!

問題: 報錯:Uncaught Error: [MODULE_MISS]"echarts/config" is not exists! 原因: require(     [         'ec

docker x509: certificate has expired or is not yet valid

%d pull mage set repos 證書 val 證書過期 ica 環境:centos 7 程序:docker 下載鏡像報錯: # docker pull centos Pulling repository centos FATA[0004] Get https

openfire 部署後 java.lang.IllegalArgumentException: interface xx is not visible from class loader

exceptio color 本地 java creat 根據 ret 打印 exception 該異常是創建代理時加載接口的類加載器與創建時傳入的不一致。 在本地eclipse做openfire二次開發,本地運行沒錯,部署到服務器上後報異常:      java.lang

TypeError: 'NoneType' object is not callable問題解決

報錯:TypeError: ‘NoneType’ object is not callable問題解決方法 def dec(function): print("start...") function() print("end...") #修飾器 @dec def

連線資料庫1130-Host 'xxx' is not allowed to connect to this MySQL server解決

出現這個問題的同學都很奇怪,為啥用localhost就可以連線上,但是使用本地ip就不行。出現這個問題的原因就是mysql未開啟mysql遠端訪問許可權導致。 這時候我們就用cmd去訪問下你的mysql下面的user表。具體操作如下: 1、連線伺服器: mysql -u root -p

matlab讀取wav檔案Data compression format (Format #65534) is not supported.

用matlab做語音相關的工作,用wavread函式讀取檔案時報錯。 自己用audition錄的雙聲道的音訊,後來將錄音檔案拆分為單聲道的音訊,用MATLAB的wavread函式讀取時,報錯。 報錯資訊如下: 網上找了些方法都沒解決。 後來用的其他的wav檔案,就可以正

mysqlExpression #1 of SELECT list is not in GROUP BY clause and contains nonaggre

detail mode sql_mode reat 配置文件 ESS ssi select color 原因:   https://blog.csdn.net/fansili/article/details/78664267 解決辦法:   1:查看mysql配置文件

Vue的Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'

pac rop space efault type require bject default logs 剛剛運行一下以前的一個Vue+webpack的demo,運行之後沒有出現想象中的效果,並且報錯 Uncaught TypeError: Cannot assign t

Myeclipse啟動An error has occurred.See the log file

entry classpath ret 出現 restore div nap cati security 出現這個問題是因為斷電前myeclipse還在運行,日誌報錯如下: !ENTRY org.eclipse.osgi 4 0 2017-07-24 08:29:48.4

JSP頁面Uncaught SyntaxError: Unexpected token <”

spa 標簽 round 個人 java expect 使用 src class   最近在做一個個人主頁博客網站的項目,遇到了這個問題。   當瀏覽器該頁面提示錯誤“Uncaught SyntaxError: Unexpected token <”時,瀏覽器通常情況

shell syntax error: unexpected end of file

not app 文件格式 解決方案 編輯 window 曾經 command exp 有時執行腳本時會報錯: [[email protected] shell]# sh -x test.sh + $‘\r‘ : command not found test.s

十、cent OS開啟APR模式configure: error: Found APR 1.3.9. You need version 1.4.3 or newer installed

config 安裝目錄 prefix org col spa -a you 新版 錯誤內容顯示APR的版本過低,需要新版本 到http://apr.apache.org/download.cgi#apr1這個地址下載所需要的包apr-1.4.5.tar.gz apr-ic

memcache啟動memcached: error while loading shared libraries: libevent-XXXXX5: cannot 。。。。

share mem dev 鏈接 debug 修改文件 memcache null 鏈接地址 創建連接 ln -s /usr/lib/libevent-2.1.so.6 /usr/lib/libevent-2.1.so.6 如果還不行就下面解決 執行下面語句查看鏈接

Uncaught ReferenceError: input is not defined

ont png pan uncaught AC cau alt style ref 報錯如下: 原因:input 元素找不到,錯誤代碼如下: 正確如下:必須加 ‘ ’ 或 “ ” 報錯:Uncaught ReferenceError: input is not

laravel --Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW)

parse size font 技術分享 info error span expected 原因 報錯如下: 原因:( ) { } [ ] 不對稱,或者用錯了。 laravel --報錯:Parse error: syntax error, unexpected &#

Linux中mysql進入命令行MYSQL ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.99.192' (111)

端口 connect 通過 l命令 linu serve nbsp linux err 場景:在Linux中安裝mysql01和mysql02,通過VIP虛出一個VIP=192.168.99.192,mysql01為主ip為192.168.99.153,mysql02為備機

c++ include包含工程目錄下的.h檔案,fatal error C1083: 無法開啟包括檔案:“Sales_item.h”: No such file or directory

背景:刷c++primer的題目,將下載的某個標頭檔案拖拽到自己建立的工程目錄下,在自己新建的原始檔中include包含時,報無法開啟檔案 明明有檔案 為什麼說無法開啟呢 於是到本地的工程目錄中開啟一看,果然沒有這個檔案 說明通過滑鼠拖拽檔案進入到工程樹上面,檔案並沒

python中使用pip安裝Fatal error in launcher... 解決方法

python安裝了2和3版本在 cmd 中用pip報的錯誤為:Fatal error in launcher:Unable to create process using 這是因為你安裝了python3和python2在你的windows下,並且在環境變數中分別配置了pip,可是並沒有區分pip3還是p

VueUncaught TypeError: Cannot assign to read only property’exports‘ of object’#[Object]‘的解決方法

發現問題 1,執行一下以前的一個Vue+webpack的 vue仿新聞網站  小專案,報錯 由於自己vue學習不深入,老是這個報錯,找了好久(確切的說是整整一下午^...^)才找到原因 -v- 2,點開錯誤的檔案,標註錯誤的地方是這樣的一段程式碼: 就是&n

log4j:ERROR Category option " 1 " not a decimal integer.

程式碼: package com.zml; import org.apache.log4j.Logger; public class Day01 { private static Logger logger = Logger.getLogger(Day01.class);