[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."
This commit is contained in:
Benoît Zugmeyer
2018-04-12 01:14:16 +02:00
committed by Mohamed Hegazy
parent fe3fcd77c9
commit c61cfb1003
2 changed files with 4 additions and 1 deletions

View File

@@ -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,

View File

@@ -219,7 +219,7 @@ declare namespace Chart {
fontColor?: ChartColor;
fontStyle?: string;
padding?: number;
text?: string;
text?: string | string[];
}
interface ChartLegendOptions {