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

Function getDimension

src/animation/universalTransition.ts:73–81  ·  view source on GitHub ↗
(data: SeriesData, visualDimension: string)

Source from the content-addressed store, hash-verified

71}
72
73function getDimension(data: SeriesData, visualDimension: string) {
74 const dimensions = data.dimensions;
75 for (let i = 0; i < dimensions.length; i++) {
76 const dimInfo = data.getDimensionInfo(dimensions[i]);
77 if (dimInfo && dimInfo.otherDims[visualDimension as keyof DataVisualDimensions] === 0) {
78 return dimensions[i];
79 }
80 }
81}
82
83// get value by dimension. (only get value of itemGroupId or childGroupId, so convert it to string)
84function getValueByDimension(data: SeriesData, dataIndex: number, dimension: DimensionName) {

Callers 1

getGroupIdFunction · 0.85

Calls 1

getDimensionInfoMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…