MCPcopy Index your code
hub / github.com/apache/echarts / createParallelCoordSys

Function createParallelCoordSys

src/coord/parallel/parallelCreator.ts:36–67  ·  view source on GitHub ↗
(ecModel: GlobalModel, api: ExtensionAPI)

Source from the content-addressed store, hash-verified

34
35
36function createParallelCoordSys(ecModel: GlobalModel, api: ExtensionAPI): CoordinateSystemMaster[] {
37 const coordSysList: CoordinateSystemMaster[] = [];
38
39 ecModel.eachComponent(COMPONENT_TYPE_PARALLEL, function (parallelModel: ParallelModel, idx: number) {
40 const coordSys = new Parallel(parallelModel, ecModel, api);
41
42 coordSys.name = 'parallel_' + idx;
43 coordSys.resize(parallelModel, api);
44
45 parallelModel.coordinateSystem = coordSys;
46 coordSys.model = parallelModel;
47
48 coordSysList.push(coordSys);
49 });
50
51 // Inject the coordinateSystems into seriesModel
52 ecModel.eachSeries(function (seriesModel) {
53 if ((seriesModel as ParallelSeriesModel).get('coordinateSystem') === COORD_SYS_TYPE_PARALLEL) {
54 const parallelModel = seriesModel.getReferringComponents(
55 COMPONENT_TYPE_PARALLEL, SINGLE_REFERRING
56 ).models[0] as ParallelModel;
57 const parallel = seriesModel.coordinateSystem = parallelModel.coordinateSystem;
58 if (parallel) {
59 each(parallel.dimensions, function (dim) {
60 associateSeriesWithAxis(parallel.getAxis(dim), seriesModel, COORD_SYS_TYPE_PARALLEL);
61 });
62 }
63 }
64 });
65
66 return coordSysList;
67}
68
69const parallelCoordSysCreator = {
70 create: createParallelCoordSys

Callers

nothing calls this directly

Calls 8

resizeMethod · 0.95
associateSeriesWithAxisFunction · 0.90
eachComponentMethod · 0.80
eachSeriesMethod · 0.80
eachFunction · 0.50
getMethod · 0.45
getAxisMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…