This is an automated email from the ASF dual-hosted git repository. wangzx pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/echarts.git
The following commit(s) were added to refs/heads/master by this push: new 5cdbdd2de chore: fix a few typos new 06ccd5c3d Merge pull request #17782 from striezel-stash/fix-typos 5cdbdd2de is described below commit 5cdbdd2def5610e96062d35f2b33dc1e434bca7a Author: Dirk Stolle <striezel-...@web.de> AuthorDate: Mon Oct 17 20:00:29 2022 +0200 chore: fix a few typos --- src/core/CoordinateSystem.ts | 4 ++-- src/core/Scheduler.ts | 12 ++++++------ src/core/echarts.ts | 34 +++++++++++++++++----------------- src/core/impl.ts | 4 ++-- src/core/task.ts | 6 +++--- src/export/api.ts | 4 ++-- src/export/api/helper.ts | 12 ++++++------ src/model/Component.ts | 6 +++--- src/model/Global.ts | 4 ++-- src/model/OptionManager.ts | 14 +++++++------- src/model/Series.ts | 8 ++++---- src/model/internalComponentCreator.ts | 6 +++--- src/scale/Interval.ts | 4 ++-- src/scale/Time.ts | 10 +++++----- src/visual/VisualMapping.ts | 4 ++-- src/visual/aria.ts | 2 +- src/visual/helper.ts | 4 ++-- 17 files changed, 69 insertions(+), 69 deletions(-) diff --git a/src/core/CoordinateSystem.ts b/src/core/CoordinateSystem.ts index 1e58d6647..b1f59222c 100644 --- a/src/core/CoordinateSystem.ts +++ b/src/core/CoordinateSystem.ts @@ -31,8 +31,8 @@ class CoordinateSystemManager { create(ecModel: GlobalModel, api: ExtensionAPI): void { let coordinateSystems: CoordinateSystemMaster[] = []; - zrUtil.each(coordinateSystemCreators, function (creater, type) { - const list = creater.create(ecModel, api); + zrUtil.each(coordinateSystemCreators, function (creator, type) { + const list = creator.create(ecModel, api); coordinateSystems = coordinateSystems.concat(list || []); }); diff --git a/src/core/Scheduler.ts b/src/core/Scheduler.ts index 17fe926ec..745631111 100644 --- a/src/core/Scheduler.ts +++ b/src/core/Scheduler.ts @@ -350,12 +350,12 @@ class Scheduler { } const performArgs: PerformArgs = scheduler.getPerformArgs(task, opt.block); // FIXME - // if intending to decalare `performRawSeries` in handlers, only + // if intending to declare `performRawSeries` in handlers, only // stream-independent (specifically, data item independent) operations can be - // performed. Because is a series is filtered, most of the tasks will not + // performed. Because if a series is filtered, most of the tasks will not // be performed. A stream-dependent operation probably cause wrong biz logic. // Perhaps we should not provide a separate callback for this case instead - // of providing the config `performRawSeries`. The stream-dependent operaions + // of providing the config `performRawSeries`. The stream-dependent operations // and stream-independent operations should better not be mixed. performArgs.skip = !stageHandler.performRawSeries && ecModel.isSeriesFiltered(task.context.model); @@ -509,10 +509,10 @@ class Scheduler { else if (getTargetSeries) { getTargetSeries(ecModel, api).each(createStub); } - // Otherwise, (usually it is legancy case), the overall task will only be - // executed when upstream dirty. Otherwise the progressive rendering of all + // Otherwise, (usually it is legacy case), the overall task will only be + // executed when upstream is dirty. Otherwise the progressive rendering of all // pipelines will be disabled unexpectedly. But it still needs stubs to receive - // dirty info from upsteam. + // dirty info from upstream. else { overallProgress = false; each(ecModel.getSeries(), createStub); diff --git a/src/core/echarts.ts b/src/core/echarts.ts index e36d03607..3724b48af 100644 --- a/src/core/echarts.ts +++ b/src/core/echarts.ts @@ -152,7 +152,7 @@ const PRIORITY_PROCESSOR_SERIES_FILTER = 800; // So data stack stage should be in front of data processing stage. const PRIORITY_PROCESSOR_DATASTACK = 900; // "Data filter" will block the stream, so it should be -// put at the begining of data processing. +// put at the beginning of data processing. const PRIORITY_PROCESSOR_FILTER = 1000; const PRIORITY_PROCESSOR_DEFAULT = 2000; const PRIORITY_PROCESSOR_STATISTIC = 5000; @@ -541,8 +541,8 @@ class ECharts extends Eventful<ECEventDefinition> { // Do not update coordinate system here. Because that coord system update in // each frame is not a good user experience. So we follow the rule that - // the extent of the coordinate system is determin in the first frame (the - // frame is executed immedietely after task reset. + // the extent of the coordinate system is determined in the first frame (the + // frame is executed immediately after task reset. // this._coordSysMgr.update(ecModel, api); // console.log('--- ec frame visual ---', remainTime); @@ -1382,9 +1382,9 @@ class ECharts extends Eventful<ECEventDefinition> { this._zr.flush(); } else if (flush !== false && env.browser.weChat) { - // In WeChat embeded browser, `requestAnimationFrame` and `setInterval` + // In WeChat embedded browser, `requestAnimationFrame` and `setInterval` // hang when sliding page (on touch event), which cause that zr does not - // refresh util user interaction finished, which is not expected. + // refresh until user interaction finished, which is not expected. // But `dispatchAction` may be called too frequently when pan on touch // screen, which impacts performance if do not throttle them. this._throttledZrFlush(); @@ -1474,7 +1474,7 @@ class ECharts extends Eventful<ECEventDefinition> { : ecModel.eachSeries(doPrepare); function doPrepare(model: ComponentModel): void { - // By defaut view will be reused if possible for the case that `setOption` with "notMerge" + // By default view will be reused if possible for the case that `setOption` with "notMerge" // mode and need to enable transition animation. (Usually, when they have the same id, or // especially no id but have the same type & name & index. See the `model.id` generation // rule in `makeIdAndName` and `viewId` generation rule here). @@ -1677,20 +1677,20 @@ class ECharts extends Eventful<ECEventDefinition> { // Undo (restoration of total ecModel) can be carried out in 'action' or outside API call. // Create new coordinate system each update - // In LineView may save the old coordinate system and use it to get the orignal point + // In LineView may save the old coordinate system and use it to get the original point. coordSysMgr.create(ecModel, api); scheduler.performDataProcessorTasks(ecModel, payload); // Current stream render is not supported in data process. So we can update // stream modes after data processing, where the filtered data is used to - // deteming whether use progressive rendering. + // determine whether to use progressive rendering. updateStreamModes(this, ecModel); // We update stream modes before coordinate system updated, then the modes info // can be fetched when coord sys updating (consider the barGrid extent fix). But // the drawback is the full coord info can not be fetched. Fortunately this full - // coord is not requied in stream mode updater currently. + // coord is not required in stream mode updater currently. coordSysMgr.update(ecModel, api); clearColorPalette(ecModel); @@ -2019,8 +2019,8 @@ class ECharts extends Eventful<ECEventDefinition> { ecIns.trigger('rendered', params); - // The `finished` event should not be triggered repeatly, - // so it should only be triggered when rendering indeed happend + // The `finished` event should not be triggered repeatedly, + // so it should only be triggered when rendering indeed happens // in zrender. (Consider the case that dipatchAction is keep // triggering when mouse move). if ( @@ -2221,7 +2221,7 @@ class ECharts extends Eventful<ECEventDefinition> { chartView.group.silent = !!seriesModel.get('silent'); // Should not call markRedraw on group, because it will disable zrender - // increamental render (alway render from the __startIndex each frame) + // incremental render (always render from the __startIndex each frame) // chartView.group.markRedraw(); updateBlend(seriesModel, chartView); @@ -2335,7 +2335,7 @@ class ECharts extends Eventful<ECEventDefinition> { chartView.eachRendered((el: Displayable) => { // FIXME marker and other components if (!el.isGroup) { - // DONT mark the element dirty. In case element is incremental and don't wan't to rerender. + // DON'T mark the element dirty. In case element is incremental and don't want to rerender. el.style.blend = blendMode; } }); @@ -2447,7 +2447,7 @@ class ECharts extends Eventful<ECEventDefinition> { savePathStates(el); } - // Only updated on changed element. In case element is incremental and don't wan't to rerender. + // Only updated on changed element. In case element is incremental and don't want to rerender. // TODO, a more proper way? if (el.__dirty) { const prevStates = el.prevStates; @@ -2471,7 +2471,7 @@ class ECharts extends Eventful<ECEventDefinition> { } } - // The use higlighted and selected flag to toggle states. + // Use highlighted and selected flag to toggle states. if (el.__dirty) { applyElementStates(el); } @@ -2734,7 +2734,7 @@ export function disConnect(groupId: string): void { } /** - * Alias and backword compat + * Alias and backward compatibility */ export const disconnect = disConnect; @@ -3016,7 +3016,7 @@ export const registerTransform = registerExternalTransform; -// Buitlin global visual +// Builtin global visual registerVisual(PRIORITY_VISUAL_GLOBAL, seriesStyleTask); registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM, dataStyleTask); registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM, dataColorPaletteTask); diff --git a/src/core/impl.ts b/src/core/impl.ts index 4fecd09cc..ffc8f2189 100644 --- a/src/core/impl.ts +++ b/src/core/impl.ts @@ -21,7 +21,7 @@ import { error } from '../util/log'; // Implementation of exported APIs. For example registerMap, getMap. -// The implentations will be registered when installing the component. +// The implementations will be registered when installing the component. // Avoid these code being bundled to the core module. const implsStore: Record<string, any> = {}; @@ -43,4 +43,4 @@ export function getImpl(name: string) { } } return implsStore[name]; -} \ No newline at end of file +} diff --git a/src/core/task.ts b/src/core/task.ts index 4d55846ea..6a25c1c12 100644 --- a/src/core/task.ts +++ b/src/core/task.ts @@ -331,11 +331,11 @@ export class Task<Ctx extends TaskContext> { } setOutputEnd(end: number): void { - // This only happend in dataTask, dataZoom, map, currently. + // This only happens in dataTask, dataZoom, map, currently. // where dataZoom do not set end each time, but only set - // when reset. So we should record the setted end, in case + // when reset. So we should record the set end, in case // that the stub of dataZoom perform again and earse the - // setted end by upstream. + // set end by upstream. this._outputDueEnd = this._settedOutputEnd = end; } diff --git a/src/export/api.ts b/src/export/api.ts index 6575f7995..3c6e9d4b2 100644 --- a/src/export/api.ts +++ b/src/export/api.ts @@ -55,7 +55,7 @@ export * as util from './api/util'; export {default as env} from 'zrender/src/core/env'; -// --------------------- Export for Exension Usage --------------------- +// --------------------- Export for Extension Usage --------------------- // export {SeriesData}; export {SeriesData as List}; // TODO: Compatitable with exists echarts-gl code export {default as Model} from '../model/Model'; @@ -77,7 +77,7 @@ export {brushSingle as innerDrawElementOnCanvas} from 'zrender/src/canvas/graphi // Should use `ComponentModel.extend` or `class XXXX extend ComponentModel` to create class. // Then use `registerComponentModel` in `install` parameter when `use` this extension. For example: // class Bar3DModel extends ComponentModel {} -// export function install(registers) { regsiters.registerComponentModel(Bar3DModel); } +// export function install(registers) { registers.registerComponentModel(Bar3DModel); } // echarts.use(install); export function extendComponentModel(proto: object): ComponentModel { const Model = (ComponentModel as ComponentModelConstructor).extend(proto) as any; diff --git a/src/export/api/helper.ts b/src/export/api/helper.ts index 3d63a7b14..92a4ddf66 100644 --- a/src/export/api/helper.ts +++ b/src/export/api/helper.ts @@ -40,7 +40,7 @@ import { createTextStyle as innerCreateTextStyle } from '../../label/labelStyle' import { DisplayState, TextCommonOption } from '../../util/types'; /** - * Create a muti dimension List structure from seriesModel. + * Create a multi dimension List structure from seriesModel. */ export function createList(seriesModel: SeriesModel) { return createSeriesData(null, seriesModel); @@ -86,9 +86,9 @@ export function createScale(dataExtent: number[], option: object | AxisBaseModel // FIXME // Currently AxisModelCommonMixin has nothing to do with the // the requirements of `axisHelper.createScaleByModel`. For - // example the method `getCategories` and `getOrdinalMeta` - // are required for `'category'` axis, and ecModel are required - // for `'time'` axis. But occationally echarts-gl happened + // example the methods `getCategories` and `getOrdinalMeta` + // are required for `'category'` axis, and ecModel is required + // for `'time'` axis. But occasionally echarts-gl happened // to only use `'value'` axis. // zrUtil.mixin(axisModel, AxisModelCommonMixin); } @@ -103,7 +103,7 @@ export function createScale(dataExtent: number[], option: object | AxisBaseModel /** * Mixin common methods to axis model, * - * Inlcude methods + * Include methods * `getFormattedLabels() => Array.<string>` * `getCategories() => Array.<string>` * `getMin(origin: boolean) => number` @@ -127,4 +127,4 @@ export function createTextStyle( ) { opts = opts || {}; return innerCreateTextStyle(textStyleModel, null, null, opts.state !== 'normal'); -} \ No newline at end of file +} diff --git a/src/model/Component.ts b/src/model/Component.ts index 8f905cf99..889159ff4 100644 --- a/src/model/Component.ts +++ b/src/model/Component.ts @@ -72,10 +72,10 @@ class ComponentModel<Opt extends ComponentOption = ComponentOption> extends Mode /** * Because simplified concept is probably better, series.name (or component.name) - * has been having too many resposibilities: + * has been having too many responsibilities: * (1) Generating id (which requires name in option should not be modified). * (2) As an index to mapping series when merging option or calling API (a name - * can refer to more then one components, which is convinient is some case). + * can refer to more than one component, which is convenient is some cases). * (3) Display. * @readOnly But injected */ @@ -281,7 +281,7 @@ class ComponentModel<Opt extends ComponentOption = ComponentOption> extends Mode getReferringComponents(mainType: ComponentMainType, opt: QueryReferringOpt): { // Always be array rather than null/undefined, which is convenient to use. models: ComponentModel[]; - // Whether target compoent specified + // Whether target component is specified specified: boolean; } { const indexKey = (mainType + 'Index') as keyof Opt; diff --git a/src/model/Global.ts b/src/model/Global.ts index 268af1108..b845d7263 100644 --- a/src/model/Global.ts +++ b/src/model/Global.ts @@ -921,8 +921,8 @@ echarts.use([${seriesImportName}]);`); }; initBase = function (ecModel: GlobalModel, baseOption: ECUnitOption & AriaOptionMixin): void { - // Using OPTION_INNER_KEY to mark that this option can not be used outside, - // i.e. `chart.setOption(chart.getModel().option);` is forbiden. + // Using OPTION_INNER_KEY to mark that this option cannot be used outside, + // i.e. `chart.setOption(chart.getModel().option);` is forbidden. ecModel.option = {} as ECUnitOption; ecModel.option[OPTION_INNER_KEY] = OPTION_INNER_VALUE; diff --git a/src/model/OptionManager.ts b/src/model/OptionManager.ts index 1e3d2d76d..ef795ba58 100644 --- a/src/model/OptionManager.ts +++ b/src/model/OptionManager.ts @@ -140,7 +140,7 @@ class OptionManager { // For simplicity, timeline options and media options do not support merge, // that is, if you `setOption` twice and both has timeline options, the latter - // timeline opitons will not be merged to the formers, but just substitude them. + // timeline options will not be merged to the former, but just substitute them. if (newParsedOption.timelineOptions.length) { optionBackup.timelineOptions = newParsedOption.timelineOptions; } @@ -392,10 +392,10 @@ function applyMediaQuery(query: MediaQuery, ecWidth: number, ecHeight: number): const realMap = { width: ecWidth, height: ecHeight, - aspectratio: ecWidth / ecHeight // lowser case for convenientce. + aspectratio: ecWidth / ecHeight // lower case for convenience. }; - let applicatable = true; + let applicable = true; each(query, function (value: number, attr) { const matched = attr.match(QUERY_REG); @@ -408,11 +408,11 @@ function applyMediaQuery(query: MediaQuery, ecWidth: number, ecHeight: number): const realAttr = matched[2].toLowerCase(); if (!compare(realMap[realAttr as keyof typeof realMap], value, operator)) { - applicatable = false; + applicable = false; } }); - return applicatable; + return applicable; } function compare(real: number, expect: number, operator: string): boolean { @@ -449,9 +449,9 @@ function indicesEquals(indices1: number[], indices2: number[]): boolean { * this might be the only simple way to implement that feature. * * MEMO: We've considered some other approaches: - * 1. Each model handle its self restoration but not uniform treatment. + * 1. Each model handles its self restoration but not uniform treatment. * (Too complex in logic and error-prone) - * 2. Use a shadow ecModel. (Performace expensive) + * 2. Use a shadow ecModel. (Performance expensive) * * FIXME: A possible solution: * Add a extra level of model for each component model. The inheritance chain would be: diff --git a/src/model/Series.ts b/src/model/Series.ts index 28ca51181..5a9dd6260 100644 --- a/src/model/Series.ts +++ b/src/model/Series.ts @@ -73,7 +73,7 @@ export const SERIES_UNIVERSAL_TRANSITION_PROP = '__universalTransitionEnabled'; interface SeriesModel { /** - * Convinient for override in extended class. + * Convenient for override in extended class. * Implement it if needed. */ preventIncremental(): boolean; @@ -319,7 +319,7 @@ class SeriesModel<Opt extends SeriesOption = SeriesOption> extends ComponentMode /** * Init a data structure from data related option in series - * Must be overriden. + * Must be overridden. */ getInitialData(option: Opt, ecModel: GlobalModel): SeriesData { return; @@ -426,7 +426,7 @@ class SeriesModel<Opt extends SeriesOption = SeriesOption> extends ComponentMode /** * Get base axis if has coordinate system and has axis. * By default use coordSys.getBaseAxis(); - * Can be overrided for some chart. + * Can be overridden for some chart. * @return {type} description */ getBaseAxis(): Axis { @@ -615,7 +615,7 @@ class SeriesModel<Opt extends SeriesOption = SeriesOption> extends ComponentMode const selectedMap = option.selectedMap; for (let i = 0; i < len; i++) { const dataIndex = innerDataIndices[i]; - // TODO diffrent types of data share same object. + // TODO different types of data share same object. const nameOrId = getSelectionKey(data, dataIndex); selectedMap[nameOrId] = true; this._selectedDataIndicesMap[nameOrId] = data.getRawIndex(dataIndex); diff --git a/src/model/internalComponentCreator.ts b/src/model/internalComponentCreator.ts index ad8dfe5cc..df53e66f2 100644 --- a/src/model/internalComponentCreator.ts +++ b/src/model/internalComponentCreator.ts @@ -28,9 +28,9 @@ import { isComponentIdInternal } from '../util/model'; // It is added since echarts 3. // (3) Why keep supporting "internal component" in global model rather than // make each type components manage their models themselves? -// Because a protential feature that reproduce a chart from a diffferent chart instance -// might be useful in some BI analysis scenario, where the entire state need to be -// retrieved from the current chart instance. So we'd bettern manage the all of the +// Because a potential feature that reproduces a chart from a different chart instance +// might be useful in some BI analysis scenario, where the entire state needs to be +// retrieved from the current chart instance. So we'd better manage all of the // state universally. // (4) Internal component always merged in "replaceMerge" approach, that is, if the existing // internal components does not matched by a new option with the same id, it will be diff --git a/src/scale/Interval.ts b/src/scale/Interval.ts index 866051dcf..3fc00cf14 100644 --- a/src/scale/Interval.ts +++ b/src/scale/Interval.ts @@ -79,8 +79,8 @@ class IntervalScale<SETTING extends Dictionary<unknown> = Dictionary<unknown>> e setInterval(interval: number): void { this._interval = interval; - // Dropped auto calculated niceExtent and use user setted extent - // We assume user wan't to set both interval, min, max to get a better result + // Dropped auto calculated niceExtent and use user-set extent. + // We assume user wants to set both interval, min, max to get a better result. this._niceExtent = this._extent.slice() as [number, number]; this._intervalPrecision = helper.getIntervalPrecision(interval); diff --git a/src/scale/Time.ts b/src/scale/Time.ts index 5b097953e..2458490b2 100644 --- a/src/scale/Time.ts +++ b/src/scale/Time.ts @@ -18,7 +18,7 @@ */ /* -* A third-party license is embeded for some of the code in this file: +* A third-party license is embedded for some of the code in this file: * The "scaleLevels" was originally copied from "d3.js" with some * modifications made for this project. * (See more details in the comment on the definition of "scaleLevels" below.) @@ -31,9 +31,9 @@ // [About UTC and local time zone]: // In most cases, `number.parseDate` will treat input data string as local time // (except time zone is specified in time string). And `format.formateTime` returns -// local time by default. option.useUTC is false by default. This design have -// concidered these common case: -// (1) Time that is persistent in server is in UTC, but it is needed to be diplayed +// local time by default. option.useUTC is false by default. This design has +// considered these common cases: +// (1) Time that is persistent in server is in UTC, but it is needed to be displayed // in local time by default. // (2) By default, the input data string (e.g., '2011-01-02') should be displayed // as its original time, without any time difference. @@ -371,7 +371,7 @@ function isUnitValueSame( function getDateInterval(approxInterval: number, daysInMonth: number) { approxInterval /= ONE_DAY; return approxInterval > 16 ? 16 - // Math.floor(daysInMonth / 2) + 1 // In this case we only want one tick betwen two month. + // Math.floor(daysInMonth / 2) + 1 // In this case we only want one tick between two months. : approxInterval > 7.5 ? 7 // TODO week 7 or day 8? : approxInterval > 3.5 ? 4 : approxInterval > 1.5 ? 2 : 1; diff --git a/src/visual/VisualMapping.ts b/src/visual/VisualMapping.ts index f964e3fb0..7610bd235 100644 --- a/src/visual/VisualMapping.ts +++ b/src/visual/VisualMapping.ts @@ -44,7 +44,7 @@ type NormalizedValue = number; type MappingMethod = 'linear' | 'piecewise' | 'category' | 'fixed'; -// May include liftZ. wich is not provided to developers. +// May include liftZ. which is not provided to developers. interface Normalizer { (this: VisualMapping, value?: RawValue): NormalizedValue @@ -361,7 +361,7 @@ class VisualMapping { } /** - * Convinent method. + * Convenient method. * Visual can be Object or Array or primary type. */ static eachVisual<Ctx, T>( diff --git a/src/visual/aria.ts b/src/visual/aria.ts index 4c1b823f5..7237c36cd 100644 --- a/src/visual/aria.ts +++ b/src/visual/aria.ts @@ -64,7 +64,7 @@ export default function ariaVisual(ecModel: GlobalModel, api: ExtensionAPI) { const useDecal = decalModel.get('show'); if (useDecal) { // Each type of series use one scope. - // Pie and funnel are using diferrent scopes + // Pie and funnel are using different scopes. const paletteScopeGroupByType = zrUtil.createHashMap<object>(); ecModel.eachSeries((seriesModel: SeriesModel) => { if (seriesModel.isColorBySeries()) { diff --git a/src/visual/helper.ts b/src/visual/helper.ts index 5c60f6f99..1ea371d9f 100644 --- a/src/visual/helper.ts +++ b/src/visual/helper.ts @@ -18,7 +18,7 @@ */ /** - * A mapping of visual provided to deverloper and visual stored in the List module. + * A mapping of visual provided to developer and visual stored in the List module. * To developer: * 'color', 'opacity', 'symbol', 'symbolSize'... * In the List module storage: @@ -85,4 +85,4 @@ export function setItemVisualFromData(data: SeriesData, dataIndex: number, key: console.warn(`Unknown visual type ${key}`); } } -} \ No newline at end of file +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org