MCPcopy Create free account
hub / github.com/chartjs/Chart.js / parseEdge

Function parseEdge

src/controllers/controller.bar.ts:360–368  ·  view source on GitHub ↗
(edge: string, a: string, b: string, reverse: boolean)

Source from the content-addressed store, hash-verified

358}
359
360function parseEdge(edge: string, a: string, b: string, reverse: boolean) {
361 if (reverse) {
362 edge = swap(edge, a, b);
363 edge = startEnd(edge, b, a);
364 } else {
365 edge = startEnd(edge, a, b);
366 }
367 return edge;
368}
369
370function swap(orig: string, v1: string, v2: string) {
371 return orig === v1 ? v2 : orig === v2 ? v1 : orig;

Callers 1

setBorderSkippedFunction · 0.85

Calls 2

swapFunction · 0.85
startEndFunction · 0.85

Tested by

no test coverage detected