mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-11-04 02:25:28 +08:00 
			
		
		
		
	Add Spectre.Cli to Spectre.Console
* Renames Spectre.Cli to Spectre.Console.Cli. * Now uses Verify with Spectre.Console.Cli tests. * Removes some duplicate definitions. Closes #168
This commit is contained in:
		
				
					committed by
					
						
						Patrik Svensson
					
				
			
			
				
	
			
			
			
						parent
						
							0bbf9b81a9
						
					
				
				
					commit
					0ae419326d
				
			
							
								
								
									
										21
									
								
								examples/Console/Charts/Program.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								examples/Console/Charts/Program.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
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);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user