package c3

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Pie charts, with or without a hole in the middle ("donut" charts).

type t

An unrendered pie chart

val make : sectors:(string * float) list -> ?hole:string -> unit -> t

Create a pie chart with a list of sectors. If hole is supplied then the pie chart will be a donut containing a string label.

val add : label:string -> value:float -> t:t -> unit -> t

Add a single sector to an unrendered pie chart

type display

A rendered pie chart

val render : bindto:string -> t -> display

Render a pie chart in a named <div>

OCaml

Innovation. Community. Security.