MCPcopy
hub / github.com/pterm/pterm / BarChartPrinter

Struct BarChartPrinter

barchart.go:14–29  ·  view source on GitHub ↗

BarChartPrinter is used to print bar charts.

Source from the content-addressed store, hash-verified

12
13// BarChartPrinter is used to print bar charts.
14type BarChartPrinter struct {
15 Writer io.Writer
16 Bars Bars
17 Horizontal bool
18 ShowValue bool
19 // Height sets the maximum height of a vertical bar chart.
20 // The default is calculated to fit into the terminal.
21 // Ignored if Horizontal is set to true.
22 Height int
23 // Width sets the maximum width of a horizontal bar chart.
24 // The default is calculated to fit into the terminal.
25 // Ignored if Horizontal is set to false.
26 Width int
27 VerticalBarCharacter string
28 HorizontalBarCharacter string
29}
30
31var (
32 // DefaultBarChart is the default BarChartPrinter.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected