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

Method render

src/component/graphic/GraphicView.ts:88–106  ·  view source on GitHub ↗
(graphicModel: GraphicComponentModel, ecModel: GlobalModel, api: ExtensionAPI)

Source from the content-addressed store, hash-verified

86 }
87
88 render(graphicModel: GraphicComponentModel, ecModel: GlobalModel, api: ExtensionAPI): void {
89 // Having leveraged between use cases and algorithm complexity, a very
90 // simple layout mechanism is used:
91 // The size(width/height) can be determined by itself or its parent (not
92 // implemented yet), but can not by its children. (Top-down travel)
93 // The location(x/y) can be determined by the bounding rect of itself
94 // (can including its descendants or not) and the size of its parent.
95 // (Bottom-up travel)
96
97 // When `chart.clear()` or `chart.setOption({...}, true)` with the same id,
98 // view will be reused.
99 if (graphicModel !== this._lastGraphicModel) {
100 this._clear();
101 }
102 this._lastGraphicModel = graphicModel;
103
104 this._updateElements(graphicModel);
105 this._relocate(graphicModel, api);
106 }
107
108 /**
109 * Update graphic elements.

Callers

nothing calls this directly

Calls 3

_clearMethod · 0.95
_updateElementsMethod · 0.95
_relocateMethod · 0.95

Tested by

no test coverage detected