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

Function progress

src/layout/points.ts:63–98  ·  view source on GitHub ↗
(params, data)

Source from the content-addressed store, hash-verified

61
62 return dimLen && {
63 progress(params, data) {
64 const segCount = params.end - params.start;
65 const points = useTypedArray && createFloat32Array(segCount * dimLen);
66
67 const tmpIn: ParsedValueNumeric[] = [];
68 const tmpOut: number[] = [];
69
70 for (let i = params.start, offset = 0; i < params.end; i++) {
71 let point;
72
73 if (dimLen === 1) {
74 const x = store.get(dimIdx0, i) as ParsedValueNumeric;
75 // NOTE: Make sure the second parameter is null to use default strategy.
76 point = coordSys.dataToPoint(x, null, tmpOut);
77 }
78 else {
79 tmpIn[0] = store.get(dimIdx0, i) as ParsedValueNumeric;
80 tmpIn[1] = store.get(dimIdx1, i) as ParsedValueNumeric;
81 // Let coordinate system to handle the NaN data.
82 point = coordSys.dataToPoint(tmpIn, null, tmpOut);
83 }
84
85 if (useTypedArray) {
86 points[offset++] = point[0];
87 points[offset++] = point[1];
88 }
89 else {
90 data.setItemLayout(i, point.slice());
91 }
92 }
93
94 if (useTypedArray) {
95 data.setLayout('points', points);
96 data.setLayout('pointsRange', {start: params.start, end: params.end});
97 }
98 }
99 };
100 }
101 };

Callers

nothing calls this directly

Calls 5

createFloat32ArrayFunction · 0.90
setItemLayoutMethod · 0.80
dataToPointMethod · 0.65
setLayoutMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…