diff --git a/types/chart.js/chart.js-tests.ts b/types/chart.js/chart.js-tests.ts index d1e86fd317..8d2190478f 100644 --- a/types/chart.js/chart.js-tests.ts +++ b/types/chart.js/chart.js-tests.ts @@ -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(); diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index 2c28be539d..db20617c2d 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -8,6 +8,7 @@ // Joseph Page // Dan Manastireanu // Guillaume Rodriguez +// Sergey Rubanov // 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 {