MCPcopy
hub / github.com/apache/echarts / getModel

Method getModel

src/model/Model.ts:155–168  ·  view source on GitHub ↗
(path: string | readonly string[], parentModel?: Model)

Source from the content-addressed store, hash-verified

153 // getModel(path: string | string[], parentModel?: Model): Model;
154 // TODO 'a.b.c' is deprecated
155 getModel(path: string | readonly string[], parentModel?: Model): Model<any> {
156 const hasPath = path != null;
157 const pathFinal = hasPath ? this.parsePath(path) : null;
158 const obj = hasPath
159 ? this._doGet(pathFinal)
160 : this.option;
161
162 parentModel = parentModel || (
163 this.parentModel
164 && this.parentModel.getModel(this.resolveParentPath(pathFinal) as [string])
165 );
166
167 return new Model(obj, parentModel, this.ecModel);
168 }
169
170 /**
171 * If model has option

Callers 15

createBodyOrCornerCellsFunction · 0.95
getECModelFunction · 0.45
handleLegacySelectEventsFunction · 0.45
getLabelStatesModelsFunction · 0.45
setTextStyleCommonFunction · 0.45
getFontFunction · 0.45
setLabelLineStateFunction · 0.45
getLabelLineStatesModelsFunction · 0.45
updateLayoutConfigMethod · 0.45
_updateLabelLineMethod · 0.45
applyMorphAnimationFunction · 0.45
getSeriesTransitionKeyFunction · 0.45

Calls 3

parsePathMethod · 0.95
_doGetMethod · 0.95
resolveParentPathMethod · 0.95

Tested by

no test coverage detected