VERTICAL bars + MIXED values test
(t *testing.T)
| 38 | |
| 39 | // VERTICAL bars + MIXED values test |
| 40 | func TestBarChartPrinter_RenderExample(t *testing.T) { |
| 41 | bars := pterm.Bars{ |
| 42 | pterm.Bar{ |
| 43 | Label: "Bar 1", |
| 44 | Value: 5, |
| 45 | Style: pterm.NewStyle(pterm.FgCyan), |
| 46 | }, |
| 47 | pterm.Bar{ |
| 48 | Label: "Bar 2", |
| 49 | Value: 3, |
| 50 | Style: pterm.NewStyle(pterm.FgCyan), |
| 51 | }, |
| 52 | pterm.Bar{ |
| 53 | Label: "Long Label Example", |
| 54 | Value: 7, |
| 55 | Style: pterm.NewStyle(pterm.FgCyan), |
| 56 | }, |
| 57 | pterm.Bar{ |
| 58 | Label: "Zero", |
| 59 | Value: 0, |
| 60 | Style: pterm.NewStyle(pterm.FgCyan), |
| 61 | }, |
| 62 | pterm.Bar{ |
| 63 | Label: "Negative Value", |
| 64 | Value: -4, |
| 65 | Style: pterm.NewStyle(pterm.FgCyan), |
| 66 | }, |
| 67 | pterm.Bar{ |
| 68 | Label: "NV", |
| 69 | Value: -5, |
| 70 | Style: pterm.NewStyle(pterm.FgCyan), |
| 71 | }, |
| 72 | } |
| 73 | |
| 74 | pterm.DefaultBarChart.WithBars(bars).Render() |
| 75 | } |
| 76 | |
| 77 | // VERTICAL bars + NEGATIVE values test |
| 78 | func TestBarChartPrinter_RenderNegativeBarValues(t *testing.T) { |