-
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathindex.d.ts
More file actions
59 lines (53 loc) · 1.45 KB
/
index.d.ts
File metadata and controls
59 lines (53 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { JSDOM } from "d3-node";
export interface VersionData {
/** Start date of the version */
start: string;
/** LTS start date */
lts?: string;
/** Maintenance start date */
maintenance?: string;
/** End of life date */
end: string;
/** Codename */
codename?: string;
}
export interface ScheduleData {
[version: string]: VersionData;
}
export interface Margin {
top: number;
right: number;
bottom: number;
left: number;
}
export interface CreateOptions {
/** The schedule data object with version keys */
data: ScheduleData;
/** Start date for the chart query range */
queryStart: Date;
/** End date for the chart query range */
queryEnd: Date;
/** Whether to animate the bars (default: false) */
animate?: boolean;
/** Whether to exclude the "Main" row (default: false) */
excludeMain?: boolean;
/** Project name to prefix version labels */
projectName: string;
/** Chart margins (default: { top: 30, right: 30, bottom: 30, left: 110 }) */
margin?: Margin;
/** Color for the current date marker line (e.g., 'red', '#ff0000') */
currentDateMarker?: string;
}
export interface D3NodeResult {
/** Get the SVG element */
svgString(): string;
/** Get the HTML string */
html(): string;
}
/**
* Creates an D3 chart representing the Node.js LTS schedule
*
* @param options - Configuration options for the chart
* @returns A D3Node instance
*/
export function create(options: CreateOptions): D3NodeResult;