mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
Gantt charts now show ISO durations and task captions
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var g = new JSGantt.GanttChart(document.getElementById('GanttChartDIV'), 'day');
|
var g = new JSGantt.GanttChart(document.getElementById('GanttChartDIV'), 'day');
|
||||||
g.setOptions({
|
g.setOptions({
|
||||||
vCaptionType: 'Complete', // Set to Show Caption : None,Caption,Resource,Duration,Complete,
|
vCaptionType: 'Caption', // Set to Show Caption : None,Caption,Resource,Duration,Complete,
|
||||||
vQuarterColWidth: 36,
|
vQuarterColWidth: 36,
|
||||||
vDateTaskDisplayFormat: 'day dd month yyyy', // Shown in tool tip box
|
vDateTaskDisplayFormat: 'day dd month yyyy', // Shown in tool tip box
|
||||||
vDayMajorDateDisplayFormat: 'mon yyyy - Week ww',// Set format to dates in the "Major" header of the "Day" view
|
vDayMajorDateDisplayFormat: 'mon yyyy - Week ww',// Set format to dates in the "Major" header of the "Day" view
|
||||||
@@ -50,6 +50,8 @@ g.setOptions({
|
|||||||
vFormatArr: ['Day', 'Week', 'Month', 'Quarter'], // Even with setUseSingleCell using Hour format on such a large chart can cause issues in some browsers,
|
vFormatArr: ['Day', 'Week', 'Month', 'Quarter'], // Even with setUseSingleCell using Hour format on such a large chart can cause issues in some browsers,
|
||||||
vShowRes: false, // Disable the resource column.
|
vShowRes: false, // Disable the resource column.
|
||||||
vShowComp: false, // Disable the completion column.
|
vShowComp: false, // Disable the completion column.
|
||||||
|
vShowDur: false, // Disable the duration column, because jsgantt doesn't calculate durations the way we want.
|
||||||
|
vAdditionalHeaders: {ifcduration: {title: 'Duration'}},
|
||||||
vUseToolTip: false, // Disable tooltips.
|
vUseToolTip: false, // Disable tooltips.
|
||||||
vTotalHeight: 900,
|
vTotalHeight: 900,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -989,6 +989,7 @@ class GenerateGanttChart(bpy.types.Operator):
|
|||||||
data = {
|
data = {
|
||||||
"pID": task.id(),
|
"pID": task.id(),
|
||||||
"pName": task.Name,
|
"pName": task.Name,
|
||||||
|
"pCaption": task.Name,
|
||||||
"pStart": task.TaskTime.ScheduleStart if task.TaskTime else "",
|
"pStart": task.TaskTime.ScheduleStart if task.TaskTime else "",
|
||||||
"pEnd": task.TaskTime.ScheduleFinish if task.TaskTime else "",
|
"pEnd": task.TaskTime.ScheduleFinish if task.TaskTime else "",
|
||||||
"pPlanStart": task.TaskTime.ScheduleStart if task.TaskTime else "",
|
"pPlanStart": task.TaskTime.ScheduleStart if task.TaskTime else "",
|
||||||
@@ -999,6 +1000,7 @@ class GenerateGanttChart(bpy.types.Operator):
|
|||||||
"pParent": task.Nests[0].RelatingObject.id() if task.Nests else 0,
|
"pParent": task.Nests[0].RelatingObject.id() if task.Nests else 0,
|
||||||
"pOpen": 1,
|
"pOpen": 1,
|
||||||
"pCost": 1,
|
"pCost": 1,
|
||||||
|
"ifcduration": task.TaskTime.ScheduleDuration if task.TaskTime else "",
|
||||||
}
|
}
|
||||||
if task.TaskTime and task.TaskTime.IsCritical:
|
if task.TaskTime and task.TaskTime.IsCritical:
|
||||||
data["pClass"] = "gtaskred"
|
data["pClass"] = "gtaskred"
|
||||||
|
|||||||
Reference in New Issue
Block a user