/
githubmirror
/
Chart.js
Обзор
Документация
Войти
/
githubmirror
/
Chart.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixtures/controller.line/stacking/stack-cache.js
56 строк
969 B
markw65
Fix early exit from clearStacks (#12155)
28 май 2026, 00:17
Не верифицирован
28 май 2026, 00:17
cb02e1d
Код
Авторство
О чём код?
function makeDs(label, offset) { return { label, data: [ [0, 12], [1, 19], [2, 3], [2, 5], [3, 2], [4, 3], ].map(([x, y]) => ({x, y: y === null ? null : y + offset})), showLine: true, spanGaps: false, stack: `stack${label}`, borderColor: label === 'A' ? '#c00' : '#00c' }; } const dsA = makeDs('A', 0); const dsB = makeDs('B', 1); module.exports = { config: { type: 'scatter', data: { datasets: [dsA, dsB], }, options: { scales: { x: {display: false}, y: {display: false}, }, elements: { point: { backgroundColor: '#444', }, }, layout: { padding: { left: 24, right: 24, }, }, }, }, options: { canvas: { height: 128, width: 256, }, async run(chart) { chart.data = {datasets: [dsB, dsA]}; chart.update(); } }, };