Chart.js/types/tests/defaults.ts
Dan Onoshko 2031cdf051
Preparing the project for TypeScript (#10595)
* Add Typescript to the build
* Converts the `helpers.core` to Typescript as an example
* Converts the `core.element` to Typescript
2022-08-22 11:58:57 -04:00

31 lines
632 B
TypeScript

import { Chart } from '../../src/types';
Chart.defaults.scales.time.time.minUnit = 'day';
Chart.defaults.plugins.title.display = false;
Chart.defaults.datasets.bar.backgroundColor = 'red';
Chart.defaults.animation = { duration: 500 };
Chart.defaults.font.size = 8;
// @ts-expect-error should be number
Chart.defaults.font.size = '8';
// @ts-expect-error should be number
Chart.defaults.font.size = () => '10';
Chart.defaults.font = {
family: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
size: 10
};
Chart.defaults.layout = {
padding: {
bottom: 10,
},
};
Chart.defaults.plugins.tooltip.boxPadding = 3;