MCPcopy
hub / github.com/chartjs/Chart.js / buildStacks

Function buildStacks

src/core/core.layouts.js:48–60  ·  view source on GitHub ↗
(layouts)

Source from the content-addressed store, hash-verified

46}
47
48function buildStacks(layouts) {
49 const stacks = {};
50 for (const wrap of layouts) {
51 const {stack, pos, stackWeight} = wrap;
52 if (!stack || !STATIC_POSITIONS.includes(pos)) {
53 continue;
54 }
55 const _stack = stacks[stack] || (stacks[stack] = {count: 0, placed: 0, weight: 0, size: 0});
56 _stack.count++;
57 _stack.weight += stackWeight;
58 }
59 return stacks;
60}
61
62/**
63 * store dimensions used instead of available chartArea in fitBoxes

Callers 1

setLayoutDimsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected