@rfprodz/client-d3-charts
Version:
Angular chart components based on D3JS (https://d3js.org).
38 lines (37 loc) • 1.84 kB
TypeScript
import { AfterViewInit, ElementRef, OnChanges } from '@angular/core';
import { IChartInputChanges } from '../../interfaces/chart-component.interface';
import { IPieChartDataNode, IPieChartOptions } from '../../interfaces/pie-chart.interface';
import { ID3ChartFactory } from '../../providers/d3-chart-factory.provider';
import { AppD3ChartBase } from '../_base/chart.base';
import * as i0 from "@angular/core";
type TPieData = IPieChartDataNode[];
type TPieOptions = Partial<IPieChartOptions>;
/** The pie chart component. */
export declare class AppPieChartComponent extends AppD3ChartBase<TPieData, TPieOptions> implements AfterViewInit, OnChanges {
private readonly doc;
private readonly d3Factory;
/** The chart id. */
chartId: string;
/** The chart data. */
data: TPieData;
/** The chart options. */
options: TPieOptions;
/** 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(): TPieOptions;
/** 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<AppPieChartComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<AppPieChartComponent, "app-pie-chart", never, { "chartId": { "alias": "chartId"; "required": false; }; "data": { "alias": "data"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, false, never>;
}
export {};