import * as i0 from '@angular/core'; import { SimpleChange, OnInit, AfterViewInit, OnDestroy, ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core'; import { Selection } from 'd3-selection'; import { Observable } from 'rxjs'; import { CurveFactory, Line, Area } from 'd3-shape'; import { ScaleLinear, ScaleTime } from 'd3-scale'; import { AxisTimeInterval, Axis } from 'd3-axis'; import { BrushBehavior } from 'd3-brush'; declare class ChartUtils { static ANIMATION_DURATION: number; static ANIMATION_EASING: (normalizedTime: number) => number; private _chartResize$; chartResize$: Observable; constructor(); static areDatasetsEqual(a: [number, number][], b: [number, number][]): boolean; static haveDomainsChanged(xDomain: SimpleChange, yDomain: SimpleChange): boolean; static hasInputChanged(input: SimpleChange): boolean; notifyChartResize(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ChartComponent implements OnInit, AfterViewInit, OnDestroy { private _elRef; chartUtils: ChartUtils; w: number; h: number; margins: { top?: number; bottom?: number; left?: number; right?: number; }; chartContainer: ElementRef; mouseEventCaptureContainer: ElementRef; hoverOverlay: ElementRef; nwMousemove: EventEmitter<[number, number]>; nwMouseleave: EventEmitter; bgClick: EventEmitter; svg: Selection; parentElement: HTMLElement; private _destroyed$; private _chartDimensionsChange$; ngOnInit(): void; ngAfterViewInit(): void; get width(): number; get height(): number; setSvg(): void; appendContainer(): void; setHoverOverlay(): void; onBackgroundClick(): void; /** * As well charts being resized due to the window being resized, another scenario is that * the parent element is squeezed or stretched in a reponsive design due to the appearance * or disappearance of other elements. For this we use our nwResizeObserver which utilizes * ResizeObserver under the hood. */ subscribeToChartResize(): void; onChartDimensionsChange(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } type NwXAxisScale = ScaleLinear | ScaleTime; declare class PathDirective implements OnInit, OnChanges, OnDestroy { private _elRef; private _chart; private _chartUtils; data: [number, number][]; xDomain: [number, number]; yDomain: [number, number]; animDuration: number; curve: CurveFactory; easing: (normalizedTime: number) => number; xScale: NwXAxisScale; animEnd: EventEmitter; line: Line<[number, number]>; path: Selection; yScale: ScaleLinear; private _chartResizeSub; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; setDomains(): void; setLine(): void; drawLine(): void; updateLine(): void; private _subscribeToChartResize; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare abstract class AxisBase implements OnInit, OnChanges, OnDestroy { private _elRef; chart: ChartComponent; private _chartUtils; tickFormat: (value: number | Date | { valueOf(): number; }) => string; tickCount: number | AxisTimeInterval; tickSizeOuter: number; tickValues: any[]; showGuidlines: boolean; animDuration: number; easing: (normalizedTime: number) => number; label: string; axis: Axis; axisSelection: Selection; axisLabelSelection: Selection; private _chartResizeSub; ngOnInit(): void; ngOnChanges(c: SimpleChanges): void; createAxis(): any; setTicks(): void; setDomain(): void; createLabel(): void; render(): any; update(): void; get fullWidth(): number; get fullHeight(): number; private _subscribeToChartResize; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class XAxisDirective extends AxisBase { align: 'top' | 'bottom' | 'center'; domain: [number, number]; scale: NwXAxisScale; scaleUpdated: EventEmitter; createAxis(): void; setTicks(): void; setDomain(): void; positionLabel(): void; render(): void; private _getAxisTranslation; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class YAxisDirective extends AxisBase { align: 'left' | 'right' | 'center'; domain: [number, number]; scaleUpdated: EventEmitter>; scale: ScaleLinear; createAxis(): void; setTicks(): void; setDomain(): void; positionLabel(): void; render(): void; private _getAxisTranslation; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class CircleDirective implements OnInit, OnChanges, OnDestroy { private _elRef; private _chart; private _chartUtils; point: [number, number]; xDomain: [number, number]; yDomain: [number, number]; animDuration: number; easing: (normalizedTime: number) => number; xScale: NwXAxisScale; circle: Selection; yScale: ScaleLinear; private _chartResizeSub; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; setDomains(): void; draw(): void; update(): void; get transform(): string; get x(): number; get y(): number; private _subscribeToChartResize; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class BrushDirective implements OnInit, OnDestroy, OnChanges { private _elRef; private _chart; extent: [[number, number], [number, number]]; dimension: 'x' | 'y' | ''; brushEnd: EventEmitter<[[number, number], [number, number]]>; brushSelection: Selection; brush: BrushBehavior; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; initialize(): void; reset(): void; private _createBrush; getExtent(): [[number, number], [number, number]]; private _subscribeToBrushEndEvent; private _clearBrush; private _unbindEvents; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class BarDirective implements OnInit, OnChanges, OnDestroy { private _elRef; private _chart; private _chartUtils; /** * [number, number] corresponds to a coordinate of [x, y] * [number, number, number] corresponds to a coordinate of [x, y2, y1] where y1 is the lower * y-value and y2 is the upper y-value. Where y1 is not provided the bar will span from the * provided y-value to 0 (the full chart height) */ value: [number, number] | [number, number, number]; xDomain: [number, number]; yDomain: [number, number]; animDuration: number; easing: (normalizedTime: number) => number; barWidth: number; xScale: NwXAxisScale; rect: Selection; yScale: ScaleLinear; private _chartResizeSub; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; setDomains(): void; draw(animDuration?: number): void; private _subscribeToChartResize; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } type AreaDatum = [number, number] | [number, number, number]; declare class AreaDirective implements OnInit, OnChanges, OnDestroy { private _elRef; private _chart; private _chartUtils; /** * Each data entry may have 2 or 3 values. If there are 3 the area is drawn within the bounds. * * If there are 2 the area is drawn to the chart height */ data: AreaDatum[]; xDomain: [number, number]; yDomain: [number, number]; animDuration: number; curve: CurveFactory; easing: (normalizedTime: number) => number; xScale: NwXAxisScale; areaSelection: Selection; area: Area; yScale: ScaleLinear; private _chartResizeSub; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; setDomains(): void; setArea(): void; drawArea(): void; updateArea(): void; private _subscribeToChartResize; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class ChartTooltipDirective implements OnChanges, AfterViewInit { private _elRef; private _renderer; position: [number, number]; chartWidth: number; chartHeight: number; chartMargins: { top?: number; bottom?: number; left?: number; right?: number; }; offsetX: number; private _width; private _height; ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; private _setTooltipSize; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class ForeignObjectDirective implements OnInit, OnChanges, OnDestroy { private _elRef; private _chart; private _chartUtils; point: [number, number]; xDomain: [number, number]; yDomain: [number, number]; animDuration: number; easing: (normalizedTime: number) => number; xScale: NwXAxisScale; foreignObject: Selection; yScale: ScaleLinear; private _chartResizeSub; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; setDomains(): void; draw(): void; update(): void; get transform(): string; get x(): number; get y(): number; private _subscribeToChartResize; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class TextDirective implements OnInit, OnChanges, OnDestroy { private _elRef; private _chart; private _chartUtils; point: [number, number]; xDomain: [number, number]; yDomain: [number, number]; animDuration: number; easing: (normalizedTime: number) => number; xScale: NwXAxisScale; text: Selection; yScale: ScaleLinear; private _chartResizeSub; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; setDomains(): void; draw(): void; update(): void; get x(): number; get y(): number; private _subscribeToChartResize; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Export cooperating directives * https://v17.angular.io/guide/standalone-components#standalone-components-for-library-authors */ declare const CHARTS_DIRECTIVES: readonly [typeof ChartComponent, typeof PathDirective, typeof XAxisDirective, typeof YAxisDirective, typeof CircleDirective, typeof BrushDirective, typeof BarDirective, typeof AreaDirective, typeof ChartTooltipDirective, typeof ForeignObjectDirective, typeof TextDirective]; export { AreaDirective, BarDirective, BrushDirective, CHARTS_DIRECTIVES, ChartComponent, ChartTooltipDirective, CircleDirective, ForeignObjectDirective, PathDirective, TextDirective, XAxisDirective, YAxisDirective };