Chart.js/types/tests/defaults.ts
Dan Onoshko ce375a6876
feat: add ESM support (#10525)
* feat: add ESM support

* build: rename UMD bundle

* chore: edit supbackages description

* style: disable es/no-import-meta linter rule

* test: dynamic import in cjs module

* docs: edit integrations page

* docs: review fixes

* chore: remove useless regex in webpack config

* ci: test size-limit only for ESM bundle
2022-08-04 18:43:26 -04:00

31 lines
619 B
TypeScript

import { Chart } from '..';
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;