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

Function largeProgress

src/chart/candlestick/candlestickLayout.ts:181–219  ·  view source on GitHub ↗
(params: StageHandlerProgressParams, data: SeriesData)

Source from the content-addressed store, hash-verified

179 }
180
181 function largeProgress(params: StageHandlerProgressParams, data: SeriesData) {
182 // Structure: [sign, x, yhigh, ylow, sign, x, yhigh, ylow, ...]
183 const points = createFloat32Array(params.count * 4);
184 let offset = 0;
185 let point;
186 const tmpIn: number[] = [];
187 const tmpOut: number[] = [];
188 let dataIndex;
189 const store = data.getStore();
190 const hasDojiColor = !!seriesModel.get(['itemStyle', 'borderColorDoji']);
191
192 while ((dataIndex = params.next()) != null) {
193 const axisDimVal = store.get(cDimI, dataIndex) as number;
194 const openVal = store.get(openDimI, dataIndex) as number;
195 const closeVal = store.get(closeDimI, dataIndex) as number;
196 const lowestVal = store.get(lowestDimI, dataIndex) as number;
197 const highestVal = store.get(highestDimI, dataIndex) as number;
198
199 if (isNaN(axisDimVal) || isNaN(lowestVal) || isNaN(highestVal)) {
200 points[offset++] = NaN;
201 offset += 3;
202 continue;
203 }
204
205 points[offset++] = getSign(store, dataIndex, openVal, closeVal, closeDimI, hasDojiColor);
206
207 tmpIn[cDimIdx] = axisDimVal;
208
209 tmpIn[vDimIdx] = lowestVal;
210 point = coordSys.dataToPoint(tmpIn, null, tmpOut);
211 points[offset++] = point ? point[0] : NaN;
212 points[offset++] = point ? point[1] : NaN;
213 tmpIn[vDimIdx] = highestVal;
214 point = coordSys.dataToPoint(tmpIn, null, tmpOut);
215 points[offset++] = point ? point[1] : NaN;
216 }
217
218 data.setLayout('largePoints', points);
219 }
220 }
221};
222

Callers

nothing calls this directly

Calls 7

createFloat32ArrayFunction · 0.90
getSignFunction · 0.85
getStoreMethod · 0.80
nextMethod · 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…