package textutils_kernel

  1. Overview
  2. Docs
Text output utilities

Install

Dune Dependency

Authors

Maintainers

Sources

textutils_kernel-v0.13.0.tar.gz
sha256=e98ca0bac2ea19a483d852e91925521885c2460b0227622a677995c6482162d4
md5=eb5421c78ffb9a1fd9521020c00f0e95

doc/textutils_kernel.text_graph/Text_graph/index.html

Module Text_graph

This module renders text graphs to visualize data on the terminal. A typical text graph looks like a bar graph as shown below:

  label1     3786 |----+----1----+----2---- ... ----+----7----+----8----+----9----+----|
  label2     3653 |----+----1----+----2---- ... ----+----7----+----8----+----9----+-
  label3     1055 |----+----1----+----2----+--
  label4      308 |----+---
  label5       70 |-
  label6      404 |----+----1
  label7       71 |-
  label8       32 |
 (each '-' is approximately 37.860 units.)
val render : ?narrow:bool -> (string * float) list -> string

Renders a text graph given labels and values. The list should be non-empty and the specified values must be positive numbers. Setting narrow enables narrower graphs.

OCaml

Innovation. Community. Security.