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

Function validatePercent

src/scale/breakImpl.ts:520–528  ·  view source on GitHub ↗
(normalizedPercent: number, msg: string)

Source from the content-addressed store, hash-verified

518 }
519
520 function validatePercent(normalizedPercent: number, msg: string): boolean {
521 if (normalizedPercent >= 0 && normalizedPercent < 1 - 1e-5) { // Avoid division error.
522 return true;
523 }
524 if (__DEV__) {
525 error(`${msg} must be >= 0 and < 1, rather than ${normalizedPercent} .`);
526 }
527 return false;
528 }
529
530 each(breakOptionList, brkOption => {
531 if (!brkOption || brkOption.start == null || brkOption.end == null) {

Callers 1

parseAxisBreakOptionFunction · 0.85

Calls 1

errorFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…