BarChartPrinter is used to print bar charts.
| 12 | |
| 13 | // BarChartPrinter is used to print bar charts. |
| 14 | type 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 | |
| 31 | var ( |
| 32 | // DefaultBarChart is the default BarChartPrinter. |
nothing calls this directly
no outgoing calls
no test coverage detected