API reference: @salmonui/gantt
GanttPdfExportOptionsinterface
import type { GanttPdfExportOptions } from '@salmonui/gantt';interface GanttPdfExportOptions<Row> {
readonly fileName?: string;
readonly pageSize?: 'A4' | 'A3' | 'Letter' | 'Legal' | {
readonly width: number;
readonly height: number;
};
readonly orientation?: 'portrait' | 'landscape';
readonly fitToWidth?: boolean;
readonly header?: string;
readonly footer?: string;
readonly font?: unknown;
readonly cell?: (ctx: {
readonly task: Row;
readonly field: string;
readonly value: unknown;
text: string;
}) => void;
readonly headerCell?: (ctx: {
readonly field: string;
text: string;
}) => void;
readonly taskbar?: (ctx: {
readonly task: Row;
readonly info: GanttTaskInfo;
color: string;
progressColor: string;
}) => void;
readonly timelineCell?: (ctx: {
readonly date: Date;
readonly tier: 'top' | 'bottom';
text: string;
}) => void;
}
A PDF export.
| Name | Signature | Description |
|---|---|---|
fileNameoptional | readonly fileName?: string; | |
pageSizeoptional | readonly pageSize?: 'A4' | 'A3' | 'Letter' | 'Legal' | {
readonly width: number;
readonly height: number;
}; | |
orientationoptional | readonly orientation?: 'portrait' | 'landscape'; | |
fitToWidthoptional | readonly fitToWidth?: boolean; | Scales the chart so the whole timeline fits the page width. Default false (pages across). |
headeroptional | readonly header?: string; | |
footeroptional | readonly footer?: string; | |
fontoptional | readonly font?: unknown; | A TrueType font for non-Latin text (the PDF writer's |
celloptional | readonly cell?: (ctx: {
readonly task: Row;
readonly field: string;
readonly value: unknown;
text: string;
}) => void; | |
headerCelloptional | readonly headerCell?: (ctx: {
readonly field: string;
text: string;
}) => void; | |
taskbaroptional | readonly taskbar?: (ctx: {
readonly task: Row;
readonly info: GanttTaskInfo;
color: string;
progressColor: string;
}) => void; | |
timelineCelloptional | readonly timelineCell?: (ctx: {
readonly date: Date;
readonly tier: 'top' | 'bottom';
text: string;
}) => void; |