mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-11-04 18:40:50 +08:00 
			
		
		
		
	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:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							7b23456d3e
						
					
				
				
					commit
					db095217b7
				
			@@ -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));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user