constructor of Chart also accepts HTMLCanvasElement (#12526)

According to http://www.chartjs.org/docs/#getting-started-creating-a-chart the constructor also accepts a HTMLCanvasElement as first argument.
This commit is contained in:
Stephan 2016-11-08 14:43:32 +01:00 committed by Masahiro Wakame
parent 9fbf2bbcd8
commit b4cd313a9a

2
chart.js/index.d.ts vendored
View File

@ -392,7 +392,7 @@ interface RadialLinearScale {
}
declare class Chart {
constructor (context: CanvasRenderingContext2D, options: ChartConfiguration);
constructor (context: CanvasRenderingContext2D | HTMLCanvasElement, options: ChartConfiguration);
config: ChartConfiguration;
destroy: () => {};
update: (duration?: any, lazy?: any) => {};