HORIZONTAL bars + MIXED values test
(t *testing.T)
| 149 | |
| 150 | // HORIZONTAL bars + MIXED values test |
| 151 | func TestBarChartPrinter_RenderExampleHorizontal(t *testing.T) { |
| 152 | pterm.DefaultBarChart.WithShowValue().WithHorizontal().WithBars(pterm.Bars{ |
| 153 | pterm.Bar{ |
| 154 | Label: "Test", |
| 155 | Value: 1337, |
| 156 | Style: pterm.NewStyle(pterm.FgRed, pterm.BgBlue, pterm.Bold), |
| 157 | }, |
| 158 | pterm.Bar{ |
| 159 | Label: "Test", |
| 160 | Value: 1000, |
| 161 | Style: pterm.NewStyle(pterm.FgRed, pterm.BgBlue, pterm.Bold), |
| 162 | }, |
| 163 | pterm.Bar{ |
| 164 | Label: "Zero", |
| 165 | Value: 0, |
| 166 | Style: pterm.NewStyle(pterm.FgRed, pterm.BgBlue, pterm.Bold), |
| 167 | }, |
| 168 | pterm.Bar{ |
| 169 | Label: "Test", |
| 170 | Value: -800, |
| 171 | Style: pterm.NewStyle(pterm.FgRed, pterm.BgBlue, pterm.Bold), |
| 172 | }, |
| 173 | pterm.Bar{ |
| 174 | Label: "Test", |
| 175 | Value: -500, |
| 176 | Style: pterm.NewStyle(pterm.FgRed, pterm.BgBlue, pterm.Bold), |
| 177 | }, |
| 178 | }).Render() |
| 179 | } |
| 180 | |
| 181 | // HORIZONTAL bars + NEGATIVE values test |
| 182 | func TestBarChartPrinter_RenderNegativeBarValuesHorizontal(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…