diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index d8759fa6b92..df69eb02eea 100644 --- a/types/index.esm.d.ts +++ b/types/index.esm.d.ts @@ -244,6 +244,11 @@ export interface DoughnutControllerDatasetOptions */ circumference: number; + /** + * Arc offset (in pixels). + */ + offset: number; + /** * Starting angle to draw this dataset from. * @default 0 @@ -292,6 +297,11 @@ export interface DoughnutControllerChartOptions { */ cutout: Scriptable>; + /** + * Arc offset (in pixels). + */ + offset: number; + /** * The outer radius of the chart. String ending with '%' means percentage of maximum radius, number means pixels. * @default '100%' diff --git a/types/tests/controllers/doughnut_offset.ts b/types/tests/controllers/doughnut_offset.ts new file mode 100644 index 00000000000..58f7546bde2 --- /dev/null +++ b/types/tests/controllers/doughnut_offset.ts @@ -0,0 +1,15 @@ +import { Chart, ChartMeta, Element } from '../../index.esm'; + +const chart = new Chart('id', { + type: 'doughnut', + data: { + labels: [], + datasets: [{ + data: [], + offset: 40, + }] + }, + options: { + offset: 20, + } +});