[chart.js] Add missing legend label configuration options (#23157)

This commit is contained in:
Sergey Rubanov
2018-01-26 20:08:30 +03:00
committed by Andy
parent 0514c038e2
commit 18c1596bad
2 changed files with 12 additions and 1 deletions

View File

@@ -45,7 +45,14 @@ const chart: Chart = new Chart(new CanvasRenderingContext2D(), {
}
}]
},
plugins: { arbitraryPlugin: {option: "value"} }
plugins: { arbitraryPlugin: {option: "value"} },
legend: {
display: true,
labels: {
usePointStyle: true,
padding: 40
}
},
}
});
chart.update();

View File

@@ -8,6 +8,7 @@
// Joseph Page <https://github.com/josefpaij>
// Dan Manastireanu <https://github.com/danmana>
// Guillaume Rodriguez <https://github.com/guillaume-ro-fr>
// Sergey Rubanov <https://github.com/chicoxyzzy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -119,6 +120,7 @@ declare namespace Chart {
lineJoin?: string;
lineWidth?: number;
strokeStyle?: string;
pointStyle?: PointStyle;
}
interface ChartTooltipItem {
@@ -231,6 +233,8 @@ declare namespace Chart {
fontFamily?: string;
padding?: number;
generateLabels?(chart: any): any;
filter?(item: ChartLegendItem, data: ChartData): any;
usePointStyle?: boolean;
}
interface ChartTooltipOptions {