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

* Renames Spectre.Cli to Spectre.Console.Cli. * Now uses Verify with Spectre.Console.Cli tests. * Removes some duplicate definitions. Closes #168
22 lines
545 B
C#
22 lines
545 B
C#
using Spectre.Console;
|
|
|
|
namespace InfoExample
|
|
{
|
|
public static class Program
|
|
{
|
|
public static void Main()
|
|
{
|
|
var chart = new BarChart()
|
|
.Width(60)
|
|
.Label("[green bold underline]Number of fruits[/]")
|
|
.CenterLabel()
|
|
.AddItem("Apple", 12, Color.Yellow)
|
|
.AddItem("Orange", 54, Color.Green)
|
|
.AddItem("Banana", 33, Color.Red);
|
|
|
|
AnsiConsole.WriteLine();
|
|
AnsiConsole.Render(chart);
|
|
}
|
|
}
|
|
}
|