API reference: @salmonui/export/gantt
GanttPdfModelinterface
import type { GanttPdfModel } from '@salmonui/export/gantt';interface GanttPdfModel {
readonly title?: string;
readonly direction?: 'ltr' | 'rtl';
readonly columns: readonly {
readonly header: string;
readonly width: number;
readonly align?: 'start' | 'center' | 'end';
}[];
readonly rows: readonly {
readonly cells: readonly string[];
readonly depth: number;
readonly parent: boolean;
readonly height: number;
}[];
readonly chartWidth: number;
readonly headerHeight: number;
readonly tiers: readonly {
readonly cells: readonly {
readonly x: number;
readonly width: number;
readonly text: string;
}[];
}[];
readonly bars: readonly GanttPdfBar[];
readonly connectors: readonly {
readonly points: readonly (readonly [
number,
number
])[];
readonly color: string;
}[];
readonly shades: readonly {
readonly x: number;
readonly width: number;
readonly color: string;
readonly label?: string;
}[];
readonly markers: readonly {
readonly x: number;
readonly color: string;
readonly label?: string;
}[];
readonly colors: {
readonly text: string;
readonly headerText: string;
readonly headerBackground: string;
readonly line: string;
readonly background: string;
};
}
The laid-out Gantt chart to print, in CSS px.
| Name | Signature | Description |
|---|---|---|
titleoptional | readonly title?: string; | Document title ( |
directionoptional | readonly direction?: 'ltr' | 'rtl'; | |
columns | readonly columns: readonly {
readonly header: string;
readonly width: number;
readonly align?: 'start' | 'center' | 'end';
}[]; | Grid pane columns, px widths. |
rows | readonly rows: readonly {
readonly cells: readonly string[];
readonly depth: number;
readonly parent: boolean;
readonly height: number;
}[]; | One entry per exported row, top to bottom; |
chartWidth | readonly chartWidth: number; | Chart width in px. |
headerHeight | readonly headerHeight: number; | Height of the timeline header (all tiers) and of the grid header row, px. |
tiers | readonly tiers: readonly {
readonly cells: readonly {
readonly x: number;
readonly width: number;
readonly text: string;
}[];
}[]; | Timeline header tiers, top to bottom; cells in px from the chart start. |
bars | readonly bars: readonly GanttPdfBar[]; | |
connectors | readonly connectors: readonly {
readonly points: readonly (readonly [
number,
number
])[];
readonly color: string;
}[]; | Polylines in chart px (y from the top of the first row); the arrow is at the last point, along the last segment. |
shades | readonly shades: readonly {
readonly x: number;
readonly width: number;
readonly color: string;
readonly label?: string;
}[]; | Weekend / holiday shading, px. |
markers | readonly markers: readonly {
readonly x: number;
readonly color: string;
readonly label?: string;
}[]; | Event markers, px. |
colors | readonly colors: {
readonly text: string;
readonly headerText: string;
readonly headerBackground: string;
readonly line: string;
readonly background: string;
}; |