mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 00:42:51 +08:00

* Begin breakdown chart documentation * Fix generator build failure * Add in breakdown chart graphics * Add breakdown chart documentation and move cast files
21 lines
679 B
C#
21 lines
679 B
C#
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));
|
|
}
|
|
}
|
|
} |