Boxart.Render.PieChart (Boxart v0.3.1)

Copy Markdown View Source

Renderer for pie chart diagrams as horizontal bar charts.

Draws a stacked summary bar at the top, then per-slice horizontal bars with percentage labels. Uses Boxart.Canvas for rendering.

Summary

Functions

render(chart, opts \\ [])

Renders a PieChart to a string.

Options

  • :charset:unicode (default) or :ascii

render_canvas(chart, opts)

@spec render_canvas(
  Boxart.Render.PieChart.PieChart.t(),
  keyword()
) :: Boxart.Canvas.t()

Renders a PieChart to a Boxart.Canvas.

rjust(str, width)

See Boxart.Utils.rjust/2.