MCPcopy Create free account
hub / github.com/apache/echarts / getLineBlockLengthY

Function getLineBlockLengthY

src/util/decal.ts:429–440  ·  view source on GitHub ↗
(dash: number[])

Source from the content-addressed store, hash-verified

427}
428
429function getLineBlockLengthY(dash: number[]): number {
430 let blockLength = 0;
431 for (let i = 0; i < dash.length; ++i) {
432 blockLength += dash[i];
433 }
434 if (dash.length % 2 === 1) {
435 // [4, 2, 1] means |---- - -- |---- - -- |
436 // So total length is (4 + 2 + 1) * 2
437 return blockLength * 2;
438 }
439 return blockLength;
440}

Callers 2

setPatternnSourceFunction · 0.85
getLineBlockLengthXFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected