UNPKG

handwritten-graph

Version:

A TypeScript library to create handwritten-style line graphs and pie charts using D3.js

24 lines 1.05 kB
import * as d3 from 'd3'; import { BaseChartConfig, ChartMargin } from '../types'; export declare abstract class BaseChart<TData, TConfig extends BaseChartConfig> { protected selector: string; protected defaultConfig: Required<TConfig>; protected config: Required<TConfig>; protected container: d3.Selection<HTMLDivElement, unknown, HTMLElement, undefined>; protected svg: d3.Selection<SVGGElement, unknown, null, undefined>; protected defs: d3.Selection<SVGDefsElement, unknown, null, undefined>; protected data: TData; protected width: number; protected height: number; protected margin: Required<ChartMargin>; private isInitialized; constructor(selector: string, data: TData, config: TConfig, defaultConfig: Required<TConfig>); protected renderChart(): void; private initializeContainer; private initializeSVG; protected createXkcdFilter(): void; protected isReady(): boolean; protected abstract render(): void; destroy(): void; } //# sourceMappingURL=BaseChart.d.ts.map