This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch fix-null-check in repository https://gitbox.apache.org/repos/asf/echarts.git
commit 8985de83843038696e39be10c547fdbd94b69eb3 Author: plainheart <[email protected]> AuthorDate: Fri Nov 25 22:01:45 2022 +0800 chore(log): use warn util instead of `console.warn` --- src/core/echarts.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core/echarts.ts b/src/core/echarts.ts index 3724b48af..8a4283828 100644 --- a/src/core/echarts.ts +++ b/src/core/echarts.ts @@ -112,7 +112,7 @@ import { import Displayable from 'zrender/src/graphic/Displayable'; import { seriesSymbolTask, dataSymbolTask } from '../visual/symbol'; import { getVisualFromData, getItemVisualFromData } from '../visual/helper'; -import { deprecateLog, deprecateReplaceLog, error } from '../util/log'; +import { deprecateLog, deprecateReplaceLog, error, warn } from '../util/log'; import { handleLegacySelectEvents } from '../legacy/dataSelectAction'; import { registerExternalTransform } from '../data/helper/transform'; @@ -974,7 +974,7 @@ class ECharts extends Eventful<ECEventDefinition> { } else { if (__DEV__) { - console.warn(key + ': ' + (view + warn(key + ': ' + (view ? 'The found component do not support containPoint.' : 'No view mapping to the found component.' )); @@ -983,7 +983,7 @@ class ECharts extends Eventful<ECEventDefinition> { } else { if (__DEV__) { - console.warn(key + ': containPoint is not supported'); + warn(key + ': containPoint is not supported'); } } }, this); @@ -1018,7 +1018,7 @@ class ECharts extends Eventful<ECEventDefinition> { if (__DEV__) { if (!seriesModel) { - console.warn('There is no specified seires model'); + warn('There is no specified series model'); } } @@ -1113,7 +1113,7 @@ class ECharts extends Eventful<ECEventDefinition> { // be missed, otherwise there is no way to distinguish source component. // See `dataFormat.getDataParams`. if (!isGlobalOut && !(model && view)) { - console.warn('model or view can not be found by params'); + warn('model or view can not be found by params'); } } @@ -1304,7 +1304,7 @@ class ECharts extends Eventful<ECEventDefinition> { this.hideLoading(); if (!loadingEffects[name]) { if (__DEV__) { - console.warn('Loading effects ' + name + ' not exists.'); + warn('Loading effects ' + name + ' not exists.'); } return; } @@ -1863,7 +1863,7 @@ class ECharts extends Eventful<ECEventDefinition> { } if (__DEV__) { - console.warn( + warn( 'No coordinate system that supports ' + methodName + ' found by the given finder.' ); } @@ -2594,7 +2594,7 @@ const MOUSE_EVENT_NAMES: ZRElementEventName[] = [ function disposedWarning(id: string): void { if (__DEV__) { - console.warn('Instance ' + id + ' has been disposed'); + warn('Instance ' + id + ' has been disposed'); } } @@ -2655,7 +2655,7 @@ export function init( const existInstance = getInstanceByDom(dom); if (existInstance) { if (__DEV__) { - console.warn('There is a chart instance already initialized on the dom.'); + warn('There is a chart instance already initialized on the dom.'); } return existInstance; } @@ -2668,7 +2668,7 @@ export function init( || (!dom.clientHeight && (!opts || opts.height == null)) ) ) { - console.warn('Can\'t get DOM width or height. Please check ' + 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: [email protected] For additional commands, e-mail: [email protected]
