## BarChart


A horizontal bar chart renderer.


Usage

``` python
BarChart(
    title="Chart",
    width=40,
)
```


## Parameters


`title: str = ``"Chart"`  
Chart title displayed above the bars.

`width: int = ``40`  
Maximum bar width in characters.


## Attributes


`title`  
Chart title.

`width`  
Bar width cap.

`data: dict[str, float]`  
Mapping of labels to values.


## Methods

| Name | Description |
|----|----|
| [add()](#add) | Add a data point to the chart. |
| [render()](#render) | Render the chart as a text string. |

------------------------------------------------------------------------


#### add()


Add a data point to the chart.


Usage

``` python
add(label, value)
```


##### Parameters


`label: str`  
Bar label.

`value: float`  
Numeric value.


------------------------------------------------------------------------


#### render()


Render the chart as a text string.


Usage

``` python
render()
```


##### Returns


`str`  
Multi-line string with the rendered bar chart.
