Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacco van den Berg committed Oct 15, 2024
1 parent d21444a commit 7c733fd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/types/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ Chart.defaults.font.size = '8';
// @ts-expect-error should be number
Chart.defaults.font.size = () => '10';

Chart.defaults.backgroundColor = 'red';
Chart.defaults.backgroundColor = ['red', 'blue'];
Chart.defaults.backgroundColor = (ctx) => ctx.datasetIndex % 2 === 0 ? 'red' : 'blue';

Chart.defaults.borderColor = 'red';
Chart.defaults.borderColor = ['red', 'blue'];
Chart.defaults.borderColor = (ctx) => ctx.datasetIndex % 2 === 0 ? 'red' : 'blue';

Chart.defaults.hoverBackgroundColor = 'red';
Chart.defaults.hoverBackgroundColor = ['red', 'blue'];
Chart.defaults.hoverBackgroundColor = (ctx) => ctx.datasetIndex % 2 === 0 ? 'red' : 'blue';

Chart.defaults.hoverBorderColor = 'red';
Chart.defaults.hoverBorderColor = ['red', 'blue'];
Chart.defaults.hoverBorderColor = (ctx) => ctx.datasetIndex % 2 === 0 ? 'red' : 'blue';

Chart.defaults.font = {
family: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
size: 10
Expand Down

0 comments on commit 7c733fd

Please sign in to comment.