This is an automated email from the ASF dual-hosted git repository.

ovilia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git


The following commit(s) were added to refs/heads/master by this push:
     new f0d2204  fix: use a clearer warning message when initing dom without 
size #10478 (#10509)
f0d2204 is described below

commit f0d220481df9bfd7b232c3c5e58590ed8a7e6a4f
Author: Ovilia <zwl.s...@gmail.com>
AuthorDate: Tue May 21 14:10:31 2019 +0800

    fix: use a clearer warning message when initing dom without size #10478 
(#10509)
---
 src/echarts.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/echarts.js b/src/echarts.js
index 035b454..bcbfddb 100644
--- a/src/echarts.js
+++ b/src/echarts.js
@@ -1996,7 +1996,10 @@ export function init(dom, theme, opts) {
                 || (!dom.clientHeight && (!opts || opts.height == null))
             )
         ) {
-            console.warn('Can\'t get dom width or height');
+            console.warn('Can\'t get DOM width or height. Please check '
+                + 'dom.clientWidth and dom.clientHeight. They should not be 0.'
+                + 'For example, you may need to call this in the callback '
+                + 'of window.onload.');
         }
     }
 


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

Reply via email to