New doc theme (#387)

This commit is contained in:
Phil Scott
2021-04-24 16:20:59 -04:00
committed by GitHub
parent b568098d5e
commit 2a9fbb1ee9
145 changed files with 197984 additions and 8746 deletions

View File

@ -4,11 +4,11 @@ Order: 20
Use `BarChart` to render bar charts to the console.
<img src="../assets/images/barchart.png" style="width: 100%;" />
![Example of bar chart output](../assets/images/barchart.png)
# Usage
## Usage
## Basic usage
### Basic usage
```csharp
AnsiConsole.Render(new BarChart()
@ -20,7 +20,7 @@ AnsiConsole.Render(new BarChart()
.AddItem("Banana", 33, Color.Red));
```
## Add items with converter
### Add items with converter
```csharp
// Create a list of fruits
@ -40,7 +40,7 @@ AnsiConsole.Render(new BarChart()
item.Label, item.Value, Color.Yellow)));
```
## Add items implementing IBarChartItem
### Add items implementing IBarChartItem
```csharp
public sealed class Fruit : IBarChartItem
@ -72,4 +72,4 @@ AnsiConsole.Render(new BarChart()
.CenterLabel()
.AddItem(new Fruit("Mango", 3))
.AddItems(items));
```
```