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 22:43:32 +09:00
committed by Masahiro Wakame
parent 9fbf2bbcd8
commit b4cd313a9a
+1 -1
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) => {};