ng2-google-charts
Version:
Google Charts module for Angular 2 and beyond
93 lines (92 loc) • 3.95 kB
TypeScript
import { ElementRef, OnInit, EventEmitter } from '@angular/core';
import { GoogleChartsLoaderService } from '../google-charts-loader.service';
import { GoogleChartsDataTable, GoogleChartsDataTableInterface } from '../google-charts-datatable';
import { ChartReadyEvent } from './chart-ready-event';
import { ChartErrorEvent } from './chart-error-event';
import { ChartSelectEvent } from './chart-select-event';
import { ChartMouseOverEvent, ChartMouseOutEvent } from './chart-mouse-event';
import { RegionClickEvent } from './geochart-events';
import * as i0 from "@angular/core";
export interface GoogleChartInterface extends GoogleChartsDataTableInterface {
chartType: string | GoogleChartType;
options?: any;
component?: GoogleChartComponent;
}
export declare enum GoogleChartType {
AnnotationChart = "AnnotationChart",
AreaChart = "AreaChart",
BarChart = "BarChart",
BubbleChart = "BubbleChart",
Calendar = "Calendar",
CandlestickChart = "CandlestickChart",
ColumnChart = "ColumnChart",
ComboChart = "ComboChart",
Gantt = "Gantt",
Gauge = "Gauge",
GeoChart = "GeoChart",
Histogram = "Histogram",
LineChart = "LineChart",
Map = "Map",
OrgChart = "OrgChart",
PieChart = "PieChart",
Sankey = "Sankey",
ScatterChart = "ScatterChart",
SteppedAreaChart = "SteppedAreaChart",
Table = "Table",
Timeline = "Timeline",
TreeMap = "TreeMap",
VegaChart = "VegaChart",
WordTree = "WordTree"
}
export declare class GoogleChartComponent implements OnInit {
private el;
private loaderService;
data: GoogleChartInterface;
chartReady: EventEmitter<ChartReadyEvent>;
chartReadyOneTime: EventEmitter<ChartReadyEvent>;
chartError: EventEmitter<ChartErrorEvent>;
chartErrorOneTime: EventEmitter<ChartErrorEvent>;
chartSelect: EventEmitter<ChartSelectEvent>;
chartSelectOneTime: EventEmitter<ChartSelectEvent>;
mouseOver: EventEmitter<ChartMouseOverEvent>;
mouseOverOneTime: EventEmitter<ChartMouseOverEvent>;
mouseOut: EventEmitter<ChartMouseOutEvent>;
mouseOutOneTime: EventEmitter<ChartMouseOutEvent>;
regionClick: EventEmitter<RegionClickEvent>;
regionClickOneTime: EventEmitter<RegionClickEvent>;
wrapper: any;
private cli;
private options;
private HTMLel;
private dataTable;
constructor(el: ElementRef, loaderService: GoogleChartsLoaderService);
ngOnInit(): void;
init(): Promise<void>;
private recreateWrapper;
private _draw;
getDataTable(): GoogleChartsDataTable;
draw(value?: GoogleChartInterface): void;
private getSelectorBySeriesType;
/**
* Given a column number, counts how many
* columns have rol=="data". Those are mapped
* one-to-one to the series array. When rol is not defined
* a column of type number means a series column.
* @param column to inspect
*/
private getSeriesByColumn;
private getBoundingBoxForItem;
private getValueAtPosition;
private getColumnTypeAtPosition;
private getColumnLabelAtPosition;
private getHTMLTooltip;
private parseMouseEvent;
private registerChartEvents;
private registerChartWrapperEvents;
private addListener;
private addOneTimeListener;
private selectListener;
private convertOptions;
static ɵfac: i0.ɵɵFactoryDeclaration<GoogleChartComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<GoogleChartComponent, "google-chart", never, { "data": "data"; }, { "chartReady": "chartReady"; "chartReadyOneTime": "chartReadyOneTime"; "chartError": "chartError"; "chartErrorOneTime": "chartErrorOneTime"; "chartSelect": "chartSelect"; "chartSelectOneTime": "chartSelectOneTime"; "mouseOver": "mouseOver"; "mouseOverOneTime": "mouseOverOneTime"; "mouseOut": "mouseOut"; "mouseOutOneTime": "mouseOutOneTime"; "regionClick": "regionClick"; "regionClickOneTime": "regionClickOneTime"; }, never, never>;
}