diff --git a/types/google.visualization/google.visualization-tests.ts b/types/google.visualization/google.visualization-tests.ts index 7f704f9beafb4a..d72ee18abce671 100644 --- a/types/google.visualization/google.visualization-tests.ts +++ b/types/google.visualization/google.visualization-tests.ts @@ -17,6 +17,14 @@ function test_arrayToDataTable() { var dataTable = google.visualization.arrayToDataTable(array); } +function test_setChartWrapperDataTable() { + const chartWrapper = new google.visualization.ChartWrapper(); + const dataTable = test_ctorDataTable(); + + chartWrapper.setDataTable(dataTable); + chartWrapper.setDataTable(null); +} + function test_ctorDataTable() { var dataTable = new google.visualization.DataTable(); return dataTable; diff --git a/types/google.visualization/index.d.ts b/types/google.visualization/index.d.ts index fd98827de0a832..35a3ab8d1c78ff 100644 --- a/types/google.visualization/index.d.ts +++ b/types/google.visualization/index.d.ts @@ -73,7 +73,7 @@ declare namespace google { getOptions(): Object; getView(): any; setDataSourceUrl(url: string): void; - setDataTable(table: DataTable): void; + setDataTable(table: DataTable | null): void; setChartType(type: string): void; setChartName(name: string): void; setContainerId(id: string): void;