UNPKG

@ohayojp/chart

Version:

Cache the dictionary, city data etc.

47 lines (46 loc) 1.56 kB
import { Platform } from '@angular/cdk/platform'; import { EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, TemplateRef } from '@angular/core'; import { Chart, Event, Types } from '@antv/g2'; import { G2InteractionType } from '@ohayojp/chart/core'; import { OhayoConfigService, BooleanInput, NumberInput } from '@ohayojp/util'; import { NzSafeAny } from 'ng-zorro-antd/core/types'; export interface G2BarData { x: NzSafeAny; y: NzSafeAny; color?: string; [key: string]: NzSafeAny; } export interface G2BarClickItem { item: G2BarData; ev: Event; } export declare class G2BarComponent implements OnInit, OnChanges, OnDestroy { private ngZone; private platform; static ngAcceptInputType_delay: NumberInput; static ngAcceptInputType_height: NumberInput; static ngAcceptInputType_autoLabel: BooleanInput; private resize$; private _chart; private node; get chart(): Chart; delay: number; title: string | TemplateRef<void>; color: string; height: number; padding: number | number[] | 'auto'; data: G2BarData[]; autoLabel: boolean; interaction: G2InteractionType; theme: string | Types.LooseObject; clickItem: EventEmitter<G2BarClickItem>; constructor(ngZone: NgZone, configSrv: OhayoConfigService, platform: Platform); private getHeight; private install; private attachChart; private updatelabel; private installResizeEvent; ngOnInit(): void; ngOnChanges(): void; ngOnDestroy(): void; }