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

Function makeDs

test/fixtures/controller.line/stacking/stack-cache.js:1–17  ·  view source on GitHub ↗
(label, offset)

Source from the content-addressed store, hash-verified

1function makeDs(label, offset) {
2 return {
3 label,
4 data: [
5 [0, 12],
6 [1, 19],
7 [2, 3],
8 [2, 5],
9 [3, 2],
10 [4, 3],
11 ].map(([x, y]) => ({x, y: y === null ? null : y + offset})),
12 showLine: true,
13 spanGaps: false,
14 stack: `stack${label}`,
15 borderColor: label === 'A' ? '#c00' : '#00c'
16 };
17}
18
19const dsA = makeDs('A', 0);
20const dsB = makeDs('B', 1);

Callers 1

stack-cache.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected