/
githubmirror
/
Chart.js
Обзор
Документация
Войти
/
githubmirror
/
Chart.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/types/options.ts
46 строк
853 B
Daniel Cohen Gindi
Corrected spacing in pie/doughnut/polarArea (Fixes #10059) (#12238)
16 апр 2026, 14:49
Не верифицирован
16 апр 2026, 14:49
ab79c3b
Код
Авторство
О чём код?
import {Chart, ChartOptions, ChartType, DoughnutControllerChartOptions} from '../../src/types.js'; const chart = new Chart('test', { type: 'bar', data: { labels: ['a'], datasets: [{ data: [1], }, { type: 'line', data: [{ x: 1, y: 1 }] }] }, options: { animation: { duration: 500 }, backgroundColor: 'red', datasets: { line: { animation: { duration: 600 }, backgroundColor: 'blue', } }, elements: { point: { backgroundColor: 'red' } } } }); const doughnutOptions: DoughnutControllerChartOptions = { circumference: 360, cutout: '50%', offset: 0, radius: 100, rotation: 0, spacing: 0, animation: false, spacingMode: 'angular', }; const chartOptions: ChartOptions<ChartType> = doughnutOptions;