@rfprodz/client-d3-charts
Version:
Angular chart components based on D3JS (https://d3js.org).
40 lines (39 loc) • 1.99 kB
TypeScript
import { AfterViewInit, ElementRef, OnChanges } from '@angular/core';
import { IChartInputChanges } from '../../interfaces/chart-component.interface';
import { ILineChartOptions, TLineChartData } from '../../interfaces/line-chart.interface';
import { ID3ChartFactory } from '../../providers/d3-chart-factory.provider';
import { AppD3ChartBase } from '../_base/chart.base';
import * as i0 from "@angular/core";
type TLineData = TLineChartData[];
type TLineOptions = Partial<ILineChartOptions>;
/** The line chart component. */
export declare class AppLineChartComponent extends AppD3ChartBase<TLineData, TLineOptions> implements AfterViewInit, OnChanges {
private readonly doc;
private readonly d3Factory;
/** The chart id. */
chartId: string;
/** The chart data. */
data: TLineData;
/** Labels for the chart datasets. */
datasetLabels: string[];
/** The chart options. */
options: TLineOptions;
/** 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(): TLineOptions;
/** 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<AppLineChartComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<AppLineChartComponent, "app-line-chart", never, { "chartId": { "alias": "chartId"; "required": false; }; "data": { "alias": "data"; "required": false; }; "datasetLabels": { "alias": "datasetLabels"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, false, never>;
}
export {};