Add support for bar charts

Closes #103
This commit is contained in:
Patrik Svensson
2020-12-22 22:26:17 +01:00
committed by Patrik Svensson
parent 1cf30f62fc
commit 7dccb310f3
21 changed files with 597 additions and 8 deletions

View File

@@ -97,5 +97,22 @@ namespace Spectre.Console
grid.AddRow(columns.Select(column => new Markup(column)).ToArray());
return grid;
}
/// <summary>
/// Sets the grid width.
/// </summary>
/// <param name="grid">The grid.</param>
/// <param name="width">The width.</param>
/// <returns>The same instance so that multiple calls can be chained.</returns>
public static Grid Width(this Grid grid, int? width)
{
if (grid is null)
{
throw new ArgumentNullException(nameof(grid));
}
grid.Width = width;
return grid;
}
}
}