Skip to content

Commit

Permalink
Fix the scaling of gantt chart when grouping is none.
Browse files Browse the repository at this point in the history
  • Loading branch information
countincognito committed Jul 22, 2024
1 parent e3ee7c9 commit 79a8314
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,13 @@ private static PlotModel BuildGanttChartPlotModelInternal(
{
case GroupByMode.None:
{
// Add an extra row for padding.
// IntervalBarItems are added in reverse order to how they will be displayed.
// So, this item will appear at the bottom of the grouping.

series.Items.Add(new IntervalBarItem { Start = -1, End = -1 });
labels.Add(string.Empty);

// Add all the activities (in reverse display order).

IOrderedEnumerable<IDependentActivity<int, int, int>> orderedActivities = graphCompilation
Expand Down Expand Up @@ -261,6 +268,11 @@ private static PlotModel BuildGanttChartPlotModelInternal(
labels.Add(label);
}
}

// Add an extra row for padding.
// This item will appear at the top of the grouping.
series.Items.Add(new IntervalBarItem { Start = -1, End = -1 });
labels.Add(string.Empty);
}

break;
Expand Down

0 comments on commit 79a8314

Please sign in to comment.