日本語
@eightkk/vue-weave / core / timelineFromMsProject
Function: timelineFromMsProject()
timelineFromMsProject(
project,options?):MsProjectTimeline
Defined in: src/core/interchangeMsProject.ts:1312
Turn a Microsoft Project plan, such as the result of fromMsProjectXml or the input of toMsProjectXml, into GanttChart rows, bars and dependencies. Every task is a row with the task ID and name, and the outline levels become the row hierarchy (parentId). A task that the next task is nested under is a summary task: its row has no bar, so GanttChart showSummaries draws it from its subtasks. Every other task gets a bar with the task ID, the name, its dates, progress (percent complete / 100), constraints and its baselines as named baselines (options.baselineId). A milestone (milestone or start === end) is a zero-length bar at its start, and an inactive task has appearance: 'outline'. Dependencies get the IDs link-1, link-2, … in input order, with type and lag when given; a link that touches a summary task is listed in hiddenDependencyIds instead, unless options.summaryDependencies keeps it in dependencies with the summary's row ID as its end.
When the plan has resources, the result also has resources (id, label = name) and assignments for projectResourceTimeline, computed by resourceLoadFromMsProject with its default unit scale (units in percent).
Throws the Errors and RangeErrors of toMsProjectXml for invalid tasks and dependencies, and an Error for a baseline set ID that is empty, timelineBaselineId or used for two numbers. The input is not modified.