ng-d3-graphs
Version:
<img src="./assets/ng-d3.png" alt="drawing" width="250" height="250"/>
46 lines (45 loc) • 1.23 kB
TypeScript
import { ElementRef, OnInit } from '@angular/core';
import { Subject } from 'rxjs';
import { GraphOptions } from '../shared/models/graph-options.interface';
import { D3Service } from '../shared/services/d3.service';
interface LabelsAndData {
x: any;
y: any;
}
interface AxisDataX {
id: number;
value: any;
}
interface LineOptions extends GraphOptions {
gridTicks?: number;
}
export declare class LineComponent implements OnInit {
private container;
private d3Service;
data: any[];
labels: any[];
options?: LineOptions;
private _options;
parseTime: (dateString: string) => Date;
formatTime: (date: Date) => string;
private viewBox;
labelsAndData: LabelsAndData[];
AxisDataX: AxisDataX[];
onResize$: Subject<void>;
onResize(): void;
constructor(container: ElementRef, d3Service: D3Service);
ngOnInit(): void;
private render;
private addDots;
private onMouseOver;
private onMouseOut;
private changeAxisColor;
private removeAxisTicks;
private addLabelAxisY;
private addLabelAxisX;
private combineLabelsDataToOne;
private make_x_gridlines;
private make_y_gridlines;
onResizeEvent(): void;
}
export {};