package archimedes
type colorscheme =
| Default
(*A set of colors that should render good for any data.
*)| Monochrome
(*A gradient from black to white.
*)| Black
(*No colors other than black, the
*)Overpie
orOuter
keyscheme should then be used.| CustomColors of (string * Color.t) list
(*A color scheme associating a custom color to each data.
*)| ValueDependant of float -> Color.t
(*Sometimes it is desirable to use color to express something on the piechart depending on the data values, this color scheme permits it.
*)| LevelValueDependant of int -> int -> float -> Color.t -> float -> Color.t
(*For multi-levels pie charts, the color may depend of the level, the position (in the parent children's list), the parent data value/color and the actual value of the data to draw. The level 0 is the first level with at least two elements.
*)
type keyplacement =
| NoKey
(*No key at all
*)| Rectangle
(*A rectangle containing the color followed by the label of each data
*)| OverPie
(*The labels are drawn directly over the data
*)| Outer
(*The labels are drawn around the pie, next to the data they point out
*)| Selective of float
(*Outer when the angle formed by a region is lower than the given angle (in radians).
*)
type keylabels =
| Label
(*Just the name of the data
*)| WithValues
(*The name followed by the value between parentheses
*)| WithPercents
(*The name followed by the percentage among all data between parentheses
*)| OnlyValues
(*Only the value
*)| OnlyPercents
(*Only the percentage
*)| CustomLabels of string -> float -> float -> string
(*A custom label made of the name, the value and the percentage.
*)
val simple :
?style:style ->
?colorscheme:colorscheme ->
?keyplacement:keyplacement ->
?keylabels:keylabels ->
?x0:float ->
?y0:float ->
?xend:float ->
?yend:float ->
Viewport.t ->
(string * float) list ->
unit
simple vp data
draws a pie chart on vp
.
val multilevel :
?style:style ->
?colorscheme:colorscheme ->
?keylabels:keylabels ->
?x0:float ->
?y0:float ->
?xend:float ->
?yend:float ->
Viewport.t ->
multidata list ->
unit
multilevel vp data
draws a multilevel pie chart on vp
. The default options are tuned for a multilevel pie chart