Add documentation for Breakdown Chart (#1000)

* Begin breakdown chart documentation
* Fix generator build failure
* Add in breakdown chart graphics
* Add breakdown chart documentation and move cast files
This commit is contained in:
Benjamin Michaelis
2022-10-06 13:02:25 -07:00
committed by GitHub
parent 7b23456d3e
commit db095217b7
7 changed files with 249 additions and 73 deletions

View File

@ -0,0 +1,21 @@
using Spectre.Console;
namespace Generator.Commands.Samples
{
internal class BreakdownChartSample : BaseSample
{
public override (int Cols, int Rows) ConsoleSize => (base.ConsoleSize.Cols, 5);
public override void Run(IAnsiConsole console)
{
console.Write(new BreakdownChart()
.Width(60)
.AddItem("SCSS", 80, Color.Red)
.AddItem("HTML", 28.3, Color.Blue)
.AddItem("C#", 22.6, Color.Green)
.AddItem("JavaScript", 6, Color.Yellow)
.AddItem("Ruby", 6, Color.LightGreen)
.AddItem("Shell", 0.1, Color.Aqua));
}
}
}