This is an automated email from the ASF dual-hosted git repository. ovilia pushed a commit to branch fix-10478 in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit dace552555410e30395e41b096fb286117d9a966 Author: Ovilia <zwl.s...@gmail.com> AuthorDate: Tue May 21 13:45:46 2019 +0800 fix: use a clearer warning message when initing dom without size #10478 --- 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