• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

guptarohit / asciigraph / 23683451182
93%

Build:
DEFAULT BRANCH: master
Ran 28 Mar 2026 10:39AM UTC
Jobs 1
Files 5
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Mar 2026 10:39AM UTC coverage: 92.892% (-2.3%) from 95.158%
23683451182

push

github

web-flow
feat: added X-axis support with tick marks & labels (#78)

- Add `XAxisRange(min, max)` option to render a labeled X-axis below the
plot
- Add `XAxisTickCount(n)` to control tick density and
`XAxisValueFormatter(fn)` for custom labels
- CLI flags: `-xmin`, `-xmax`, `-xt`
- Works with all existing features: captions, legends, colors,
multi-series, width interpolation

Closes #28

### Example


```go
data := []float64{1, 3, 5, 8, 6, 4, 2, 3, 5, 7, 9, 11, 10, 8, 6, 4, 3, 2, 1, 2, 4, 6, 8, 10, 12}
fmt.Println(asciigraph.Plot(data,
    asciigraph.XAxisRange(0, 24),
    asciigraph.XAxisTickCount(5),
    asciigraph.Caption("CPU Usage (%)"),
))
```

Output:
```bash
 12.00 ┤                       ╭
 11.00 ┤          ╭╮           │
 10.00 ┤          │╰╮         ╭╯
  9.00 ┤         ╭╯ │         │
  8.00 ┤  ╭╮     │  ╰╮       ╭╯
  7.00 ┤  ││    ╭╯   │       │
  6.00 ┤  │╰╮   │    ╰╮     ╭╯
  5.00 ┤ ╭╯ │  ╭╯     │     │
  4.00 ┤ │  ╰╮ │      ╰╮   ╭╯
  3.00 ┤╭╯   │╭╯       ╰╮  │
  2.00 ┤│    ╰╯         ╰╮╭╯
  1.00 ┼╯                ╰╯
       └┬─────┬─────┬─────┬─────┬
        0     6    12    18    24
              CPU Usage (%)
```

#### CLI support

```bash
unbuffer paste -d, \
  <(ping -i 0.4 google.com | sed -u -n -E 's/.*time=([0-9.]+) ms.*/\1/p') \
  <(ping -i 0.4 duckduckgo.com | sed -u -n -E 's/.*time=([0-9.]+) ms.*/\1/p') \
| go run cmd/asciigraph/main.go \
    -r -f 3 -h 15 -w 60 -b 60 -sn 2 \
    -lb 0 \
    -xmin -24 -xmax 0 -xt 5 \
    -sc "blue,red" -ac white -lc white -cc yellow \
    -c "Ping Latency (ms) · Last 24s" \
    -sl "Google, DuckDuckGo"
```

Output:

![demo](https://github.com/user-attachments/assets/66f9e551-da91-4e86-b978-ff800bc16f96)

131 of 152 new or added lines in 2 files covered. (86.18%)

575 of 619 relevant lines covered (92.89%)

1485.79 hits per line

Uncovered Changes

Lines Coverage ∆ File
21
93.22
-4.55% asciigraph.go
Jobs
ID Job ID Ran Files Coverage
1 Go- - 23683451182.1 28 Mar 2026 10:39AM UTC 5
92.89
GitHub Action Run
Source Files on build 23683451182
  • Tree
  • List 5
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 1411f496 on github
  • Prev Build on master (#23067143700)
  • Next Build on master (#23683811981)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc