diff --git a/types/tests/data_types.ts b/types/tests/data_types.ts new file mode 100644 index 00000000000..1740d8e6690 --- /dev/null +++ b/types/tests/data_types.ts @@ -0,0 +1,20 @@ +import { Chart } from '../index.esm'; + +const chart = new Chart('chart', { + type: 'bar', + data: { + labels: ['1', '2', '3'], + datasets: [{ data: [[1, 2], [1, 2], [1, 2]] }], + } +}); + +const chart2 = new Chart('chart2', { + type: 'bar', + data: { + datasets: [{ + data: [{ id: 'Sales', nested: { value: 1500 } }, { id: 'Purchases', nested: { value: 500 } }], + }], + }, + options: { parsing: { xAxisKey: 'id', yAxisKey: 'nested.value' }, + }, +});