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

Interface CoordinateSystemMaster

src/coord/CoordinateSystem.ts:54–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 * one or multiple `cartesian2d`s, which are `CoordinateSystem`s.
53 */
54export interface CoordinateSystemMaster {
55
56 // FIXME current dimensions must be string[].
57 // check and unify the definition.
58 // Should be the same as its coordinateSystemCreator.
59 dimensions: DimensionName[];
60
61 model?: ComponentModel;
62
63 // Injected if required.
64 boxCoordinateSystem?: CoordinateSystem;
65
66 update?: (ecModel: GlobalModel, api: ExtensionAPI) => void;
67
68 // This methods is also responsible for determining whether this
69 // coordinate system is applicable to the given `finder`.
70 // Each coordinate system will be tried, until one returns non-
71 // null/undefined value.
72 // Aslo support
73 // const resultNumber = convertToPixel({someAxis: 0}, number);
74 convertToPixel?(
75 ecModel: GlobalModel,
76 finder: ParsedModelFinder,
77 value: Parameters<CoordinateSystem['dataToPoint']>[0],
78 opt?: unknown
79 ): ReturnType<CoordinateSystem['dataToPoint']> | number | NullUndefined;
80
81 // This methods is also responsible for determining whether this
82 // coordinate system is applicable to the given `finder`.
83 // Each coordinate system will be tried, until one returns non-
84 // null/undefined value.
85 convertToLayout?(
86 ecModel: GlobalModel,
87 finder: ParsedModelFinder,
88 value: Parameters<NonNullable<CoordinateSystem['dataToLayout']>>[0],
89 opt?: unknown
90 ): ReturnType<NonNullable<CoordinateSystem['dataToLayout']>> | NullUndefined;
91
92 // This methods is also responsible for determining whether this
93 // coordinate system is applicable to the given `finder`.
94 // Each coordinate system will be tried, until one returns non-
95 // null/undefined value.
96 convertFromPixel?(
97 ecModel: GlobalModel,
98 finder: ParsedModelFinder,
99 pixelValue: Parameters<NonNullable<CoordinateSystem['pointToData']>>[0],
100 opt?: unknown
101 ): ReturnType<NonNullable<CoordinateSystem['pointToData']>> | NullUndefined;
102
103 // @param point Point in global pixel coordinate system.
104 // The signature of this method should be the same as `CoordinateSystemExecutive`
105 containPoint(point: number[]): boolean;
106
107 // Must be implemented when `axisPointerEnabled` is `true`.
108 getAxes?: () => Axis[];
109
110 axisPointerEnabled?: boolean;
111

Callers 2

converter.test.tsFile · 0.65
converter.test.tsFile · 0.65

Implementers 9

Calendarsrc/coord/calendar/Calendar.ts
Matrixsrc/coord/matrix/Matrix.ts
Viewsrc/coord/View.ts
Gridsrc/coord/cartesian/Grid.ts
Parallelsrc/coord/parallel/Parallel.ts
Geosrc/coord/geo/Geo.ts
Singlesrc/coord/single/Single.ts
Radarsrc/coord/radar/Radar.ts
Polarsrc/coord/polar/Polar.ts

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…