Merge remote-tracking branch 'upstream/master' into merge_7_25

This commit is contained in:
Ryan Cavanaugh
2016-07-27 10:57:46 -07:00
312 changed files with 30700 additions and 5251 deletions

View File

@@ -488,3 +488,25 @@ function test_formatter_PatternFormat() {
table.draw(view, { allowHtml: true, showRowNumber: true, width: '100%', height: '100%' });
}
function test_ChartsLoad() {
google.charts.load('current', {packages: ['corechart', 'table', 'sankey']});
function drawChart() {
// Define the chart to be drawn.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Element');
data.addColumn('number', 'Percentage');
data.addRows([
['Nitrogen', 0.78],
['Oxygen', 0.21],
['Other', 0.01]
]);
// Instantiate and draw the chart.
var chart = new google.visualization.PieChart(document.getElementById('myPieChart'));
chart.draw(data, null);
}
google.charts.setOnLoadCallback(drawChart);
}

View File

@@ -1,6 +1,6 @@
// Type definitions for Google Visualisation Apis
// Project: https://developers.google.com/chart/
// Definitions by: Dan Ludwig <https://github.com/danludwig>
// Definitions by: Dan Ludwig <https://github.com/danludwig>, Gregory Moore <https://github.com/gmoore-sjcorg>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace google {
@@ -9,6 +9,12 @@ declare namespace google {
function setOnLoadCallback(handler: Function): void;
function setOnLoadCallback(handler: () => void): void;
// https://developers.google.com/chart/interactive/docs/basic_load_libs
namespace charts {
function load(version: string, packages: Object): void;
function setOnLoadCallback(handler: Function): void;
}
//https://developers.google.com/chart/interactive/docs/reference
namespace visualization {
@@ -141,6 +147,7 @@ declare namespace google {
id?: string;
role?: string;
pattern?: string;
p?: any;
}
export interface DataObject {
@@ -186,6 +193,42 @@ declare namespace google {
function arrayToDataTable(data: any[], firstRowIsData?: boolean): DataTable;
//#endregion
//#region Query
// https://developers.google.com/chart/interactive/docs/reference#query
export class Query {
constructor(dataSourceUrl: string, options?: QueryOptions);
abort(): void;
setRefreshInterval(intervalSeconds: number): void;
setTimeout(timeoutSeconds: number): void;
setQuery(queryString:string): void;
send(callback: (response: QueryResponse) => void): void;
}
export interface QueryOptions {
sendMethod?: string,
makeRequestParams?: Object
}
//#endregion
//#region QueryResponse
// https://developers.google.com/chart/interactive/docs/reference#queryresponse
export class QueryResponse {
constructor(responseObject: Object);
getDataTable(): DataTable;
getDetailedMessage(): string;
getMessage(): string;
getReasons(): string[];
hasWarning(): boolean;
isError(): boolean;
}
//#endregion
//#region DataView