Updated Barchart API (markdown)

Jakub Sobon 2019-03-18 23:43:47 -04:00
parent 02977284fb
commit 79d72598f0
1 changed files with 7 additions and 1 deletions

@ -70,9 +70,15 @@ Which results in the following barchart:
[[/images/barchart-api/five_values.png|five_values]]
## [BarChart.ValueCapacity](https://godoc.org/github.com/mum4k/termdash/widgets/barchart#BarChart.ValueCapacity)
The **BarChart.ValueCapacity** method returns the number of values that can fit the canvas currently available to the widget. This can be useful when the developer desires to completely fill the barchart with values.
Refer to the the [barchartdemo](https://github.com/mum4k/termdash/blob/master/widgets/barchart/barchartdemo/barchartdemo.go) which demonstrates the usage of this method. Observe how new bars appear or disappear as you resize the terminal window that contains the barchart.
## [barchart.Option](https://godoc.org/github.com/mum4k/termdash/widgets/barchart#Option)
Both the **barchart.New** function and the **BarChart.Values** method accept options that change how the barchart behaves and looks. See the [[BarChart Options|barchart-options]] page for more details.
Both the **barchart.New** function and the **BarChart.Values** method accept options that change how the barchart behaves and looks. This section documents the individual options and their behavior.
## Keyboard input