mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 11:51:10 +08:00
[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:
committed by
Mohamed Hegazy
parent
fe3fcd77c9
commit
c61cfb1003
@@ -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,
|
||||
|
||||
2
types/chart.js/index.d.ts
vendored
2
types/chart.js/index.d.ts
vendored
@@ -219,7 +219,7 @@ declare namespace Chart {
|
||||
fontColor?: ChartColor;
|
||||
fontStyle?: string;
|
||||
padding?: number;
|
||||
text?: string;
|
||||
text?: string | string[];
|
||||
}
|
||||
|
||||
interface ChartLegendOptions {
|
||||
|
||||
Reference in New Issue
Block a user