VSeed, an elegant data composer, transforming complexity into simplicity.
!!!###!!!title=Gantt Baseline——VisActor/VTable tutorial documents!!!###!!!!!!###!!!description=The baseline bar visualizes the "planned baseline" against the actual task schedule. It can be drawn above, below, or overlapped with the task bar to highlight deviations.!!!###!!!
Gantt Baseline Bar
The baseline bar visualizes the "planned baseline" against the actual task schedule. It can be drawn above, below, or overlapped with the task bar to highlight deviations.
Options
taskBar.baselineStartDateField: baseline start date field in records, e.g. baselineStartDate.
taskBar.baselineEndDateField: baseline end date field in records, e.g. baselineEndDate.
taskBar.baselineStyle: baseline bar style, same fields as barStyle, or a function returning per-task style.
If you want the task bar and baseline bar to be layered, set baselinePosition to 'top' or 'bottom'; if you want them to overlap, set baselinePosition: 'overlap', and the task bar and baseline bar will be centered vertically.
If you want to customize the position of the task bar, you can adjust paddingTop in baselineStyle and barStyle to achieve it.
API: Read baseline info
Use getBaselineInfoByTaskListIndex(index, subIndex?) to get baseline start/end dates and days:
const info = ganttInstance.getBaselineInfoByTaskListIndex(0);
// { baselineStartDate, baselineEndDate, baselineDays }