ng2-google-charts
Version:
Google Charts module for Angular 2 and beyond
89 lines (88 loc) • 2.69 kB
TypeScript
import { EventEmitter } from '@angular/core';
import * as i0 from "@angular/core";
export interface ArrowFormatInterface {
base: number;
}
export interface BarFormatInterface {
base?: number;
colorNegative?: string;
colorPositive?: string;
drawZeroLine?: boolean;
max?: number;
min?: number;
showValue?: boolean;
width?: number;
}
export interface RangeInterface {
from: number | Date | number[];
to: number | Date | number[];
color?: string;
bgcolor?: string;
fromBgColor?: string;
toBgColor?: string;
}
export interface ColorFormatInterface {
ranges?: RangeInterface[];
}
export interface DateFormat {
formatType?: string;
pattern?: string;
timeZone?: number;
}
export interface NumberFormatInterface {
decimalSymbol?: string;
fractionDigits?: number;
groupingSymbol?: string;
negativeColor?: string;
negativeParens?: boolean;
pattern?: string;
prefix?: string;
suffix?: string;
}
export interface PatternFormatInterface {
pattern: string;
dstColumnIndex?: number;
}
export interface FormatterInterface {
type: string;
options?: (ArrowFormatInterface | BarFormatInterface | ColorFormatInterface | DateFormat | NumberFormatInterface | PatternFormatInterface);
columns: number[];
}
export interface GoogleChartsDataTableInterface {
dataTable?: any;
firstRowIsData?: boolean;
query?: string;
dataSourceUrl?: string;
/** Refresh interval, in seconds, when using remote data source. */
refreshInterval?: number;
/** Timeout in seconds, when using remote data source */
timeout?: number;
/** Called after query executed. DataTable is updated automatically.
* @param queryResponse google.visualization.QueryResponse
*/
queryCallback?: (queryResponse: any) => any;
formatters?: FormatterInterface[];
view?: string | object | object[];
}
export declare class GoogleChartsDataTable {
private opt;
private dataTable;
query: any;
tid: any;
dataTableChanged: EventEmitter<any>;
constructor(opt: GoogleChartsDataTableInterface);
private send;
init(opt?: GoogleChartsDataTableInterface): void;
/**
* @returns Underlying google.visualization.DataTable
*/
getDataTable(): any;
setDataTable(dt: any, firstRowIsData?: boolean): void;
private _setDataTable;
/**
* Applies formatters to data columns, if defined
*/
reformat(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<GoogleChartsDataTable, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<GoogleChartsDataTable, never, never, {}, { "dataTableChanged": "dataTableChanged"; }, never>;
}