UNPKG

@rfprodz/client-d3-charts

Version:

Angular chart components based on D3JS (https://d3js.org).

40 lines (39 loc) 1.99 kB
import { AfterViewInit, ElementRef, OnChanges } from '@angular/core'; import { IChartInputChanges } from '../../interfaces/chart-component.interface'; import { IGaugeChartDataNode, IGaugeChartOptions } from '../../interfaces/gauge-chart.interface'; import { ID3ChartFactory } from '../../providers/d3-chart-factory.provider'; import { AppD3ChartBase } from '../_base/chart.base'; import * as i0 from "@angular/core"; type TGaugeData = IGaugeChartDataNode[]; type TGaugeOptions = Partial<IGaugeChartOptions>; /** The gauge chart component. */ export declare class AppGaugeChartComponent extends AppD3ChartBase<TGaugeData, TGaugeOptions> implements AfterViewInit, OnChanges { private readonly doc; private readonly d3Factory; /** The chart id. */ chartId: string; /** The value of the gauge chart. */ value: number; /** The chart data. */ data: TGaugeData; /** The chart options. */ options: TGaugeOptions; /** D3 chart view child reference. */ readonly container?: ElementRef<HTMLDivElement>; /** * @param doc The web page's Document object. * @param d3Factory D3 chart factory. */ constructor(doc: Document, d3Factory: ID3ChartFactory); /** The chart options constructor. */ protected chartOptions(): TGaugeOptions; /** Draws the chart. */ protected drawChart(): void; /** Actually draws the chart after the component view is initialized. */ ngAfterViewInit(): void; /** Redraws the chart on changes. */ ngOnChanges(changes: IChartInputChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration<AppGaugeChartComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AppGaugeChartComponent, "app-gauge-chart", never, { "chartId": { "alias": "chartId"; "required": false; }; "value": { "alias": "value"; "required": false; }; "data": { "alias": "data"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, false, never>; } export {};