jordium-gantt-vue3
Version:
A Vue 3 Gantt chart component for project management, task scheduling, resource planning, calendar, resource usage and timeline visualization.
64 lines (63 loc) • 1.53 kB
TypeScript
export type TimelineScale = 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
export declare const TimelineScale: {
HOUR: TimelineScale;
DAY: TimelineScale;
WEEK: TimelineScale;
MONTH: TimelineScale;
QUARTER: TimelineScale;
YEAR: TimelineScale;
};
export interface TimelineScaleConfig {
scale: TimelineScale;
cellWidth: number;
minCellWidth?: number;
maxCellWidth?: number;
headerLevels: number;
formatters: {
primary: string;
secondary?: string;
};
preBuffer?: number;
sufBuffer?: number;
}
export declare const SCALE_CONFIGS: Record<TimelineScale, TimelineScaleConfig>;
export interface TimelineUnit {
id: string;
startDate: Date;
endDate: Date;
label: string;
isToday?: boolean;
isWeekend?: boolean;
width: number;
}
export interface TimelineData {
scale: TimelineScale;
units: TimelineUnit[];
months?: Array<{
year: number;
month: number;
yearMonthLabel: string;
startDate: Date;
endDate: Date;
units: TimelineUnit[];
}>;
weeks?: Array<{
weekNumber: number;
year: number;
startDate: Date;
endDate: Date;
units: TimelineUnit[];
}>;
years?: Array<{
year: number;
startDate: Date;
endDate: Date;
halfYears: Array<{
label: string;
startDate: Date;
endDate: Date;
width: number;
}>;
width: number;
}>;
}