View as Markdown

API reference: @salmonui/export/gantt

GanttPdfBarinterface

import type { GanttPdfBar } from '@salmonui/export/gantt';
interface GanttPdfBar {
    readonly row: number;
    readonly kind: GanttPdfBarKind;
    readonly x: number;
    readonly width: number;
    readonly top: number;
    readonly height: number;
    readonly progress: number;
    readonly color: string;
    readonly progressColor: string;
    readonly critical?: boolean;
    readonly segments?: readonly {
        readonly x: number;
        readonly width: number;
    }[];
    readonly label?: string;
}

One bar of the chart, in px; row indexes GanttPdfModel.rows, top / height are inside the row.

GanttPdfBar members (12)
NameSignatureDescription
rowreadonly row: number;
kindreadonly kind: GanttPdfBarKind;
xreadonly x: number;
widthreadonly width: number;
topreadonly top: number;
heightreadonly height: number;
progressreadonly progress: number;

0..100.

colorreadonly color: string;

#rrggbb.

progressColorreadonly progressColor: string;
criticaloptionalreadonly critical?: boolean;

Outlined with progressColor.

segmentsoptionalreadonly segments?: readonly { readonly x: number; readonly width: number; }[];

Split task parts (px from the chart start), joined by a dashed line.

labeloptionalreadonly label?: string;

Drawn after the bar end.