From c61cfb100370f8d3762ba1ef93dccd3a5e4a6eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Zugmeyer?= Date: Thu, 12 Apr 2018 01:14:16 +0200 Subject: [PATCH] [chart.js] the `text` property of title options can be `string[]` (#24923) See the [chart.js documentation](http://www.chartjs.org/docs/latest/configuration/title.html): "if specified as an array, text is rendered on multiple lines." --- types/chart.js/chart.js-tests.ts | 3 +++ types/chart.js/index.d.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/types/chart.js/chart.js-tests.ts b/types/chart.js/chart.js-tests.ts index 03c347fee7..9e6117c5e5 100644 --- a/types/chart.js/chart.js-tests.ts +++ b/types/chart.js/chart.js-tests.ts @@ -24,6 +24,9 @@ const chart: Chart = new Chart(new CanvasRenderingContext2D(), { onHover(ev: MouseEvent, points: any[]) { return; }, + title: { + text: ["foo", "bar"] + }, tooltips: { filter: data => Number(data.yLabel) > 0, intersect: true, diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index 9e1a511229..a2ea423cb8 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -219,7 +219,7 @@ declare namespace Chart { fontColor?: ChartColor; fontStyle?: string; padding?: number; - text?: string; + text?: string | string[]; } interface ChartLegendOptions {