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

Method create

src/coord/matrix/Matrix.ts:84–105  ·  view source on GitHub ↗
(ecModel: GlobalModel, api: ExtensionAPI)

Source from the content-addressed store, hash-verified

82 private _rect: LayoutRect;
83
84 static create(ecModel: GlobalModel, api: ExtensionAPI) {
85 const matrixList: Matrix[] = [];
86
87 ecModel.eachComponent('matrix', function (matrixModel: MatrixModel) {
88 const matrix = new Matrix(matrixModel, ecModel, api);
89 matrixList.push(matrix);
90 matrixModel.coordinateSystem = matrix;
91 });
92
93 // Inject coordinate system
94 // PENDING: optimize to not to travel all components?
95 // (collect relevant components in ecModel only when model update?)
96 ecModel.eachComponent((mainType, componentModel) => {
97 injectCoordSysByOption({
98 targetModel: componentModel,
99 coordSysType: 'matrix',
100 coordSysProvider: simpleCoordSysInjectionProvider,
101 });
102 });
103
104 return matrixList;
105 }
106
107 constructor(matrixModel: MatrixModel, ecModel: GlobalModel, api: ExtensionAPI) {
108 this._model = matrixModel;

Callers

nothing calls this directly

Calls 2

injectCoordSysByOptionFunction · 0.90
eachComponentMethod · 0.80

Tested by

no test coverage detected