package ezjs_d3pie

  1. Overview
  2. Docs
type d3pie_title = {
  1. text : string;
}
type d3pie_header = {
  1. title : d3pie_title;
}
type d3pie_size_radius_value =
  1. | Radius_default
  2. | Radius_pixels of int
  3. | Radius_percentage of int
type d3pie_size = {
  1. canvas_height : int;
  2. canvas_width : int;
  3. pie_inner_radius : d3pie_size_radius_value;
  4. pie_outer_radius : d3pie_size_radius_value;
}
type d3pie_small_segment_grouping_type =
  1. | Percentage_grouping
  2. | Value_grouping
type d3pie_small_segment_grouping = {
  1. enabled : bool;
  2. value : int;
  3. value_type : d3pie_small_segment_grouping_type;
  4. label : string;
  5. color : string;
}
type d3pie_data_content = {
  1. label : string;
  2. value : int;
  3. caption : string;
}
type d3pie_sort_order =
  1. | No_sort
  2. | Sort_by_value_asc
  3. | Sort_by_value_desc
type d3pie_data = {
  1. content : d3pie_data_content list;
  2. sort_order : d3pie_sort_order;
  3. small_segment_grouping : d3pie_small_segment_grouping;
}
type d3pie_label_format_value =
  1. | Format_none
  2. | Format_label
  3. | Format_value
  4. | Format_percentage
type d3pie_inner_labels_descriptor = {
  1. format : d3pie_label_format_value;
  2. hide_when_less_than_percentage : int option;
}
type d3pie_outer_labels_descriptor = {
  1. format : d3pie_label_format_value;
  2. hide_when_less_than_percentage : int option;
  3. pie_distance : int;
}
type d3pie_labels = {
  1. outer : d3pie_outer_labels_descriptor;
  2. inner : d3pie_inner_labels_descriptor;
}
type d3pie_load_effect =
  1. | Load_effect_none
  2. | Load_effect_default of int
type d3pie_segment_on_click_effect =
  1. | Segment_on_click_effect_none
  2. | Segment_on_click_effect_linear of int * int
  3. | Segment_on_click_effect_bounce of int * int
  4. | Segment_on_click_effect_elastic of int * int
  5. | Segment_on_click_effect_back of int * int
type d3pie_effects = {
  1. load : d3pie_load_effect;
  2. segment_on_click : d3pie_segment_on_click_effect;
}
type d3pie_tooltip_type =
  1. | Tooltip_caption
  2. | Tooltip_placeholder
type d3pie_tooltips = {
  1. enabled : bool;
  2. type_ : d3pie_tooltip_type;
}
type d3pie_misc_colors = {
  1. segments : string array;
  2. segment_stroke : string;
}
type d3pie_misc = {
  1. colors : d3pie_misc_colors;
}
type d3pie_callback_argument_data = {
  1. is_grouped : bool;
  2. label : string;
  3. value : int;
}
type d3pie_callback_argument = {
  1. segment : Js_of_ocaml.Dom_html.element Js_of_ocaml.Js.t;
  2. index : int;
  3. expanded : bool;
  4. data : d3pie_callback_argument_data;
  5. color : string;
}
type d3pie_callbacks = {
  1. on_click_segment : d3pie_callback_argument -> unit;
  2. on_mouseover_segment : d3pie_callback_argument -> unit;
  3. on_mouseout_segment : d3pie_callback_argument -> unit;
}
type d3pie_settings = {
  1. data : d3pie_data;
  2. header : d3pie_header;
  3. size : d3pie_size;
  4. labels : d3pie_labels;
  5. effects : d3pie_effects;
  6. tooltips : d3pie_tooltips;
  7. misc : d3pie_misc;
  8. callbacks : d3pie_callbacks;
}
val default_settings : d3pie_settings
val set_data_content : d3pie_data_content list -> d3pie_settings -> d3pie_settings
val set_data_sort_order : d3pie_sort_order -> d3pie_settings -> d3pie_settings
val set_size_canvas_height : int -> d3pie_settings -> d3pie_settings
val set_size_canvas_width : int -> d3pie_settings -> d3pie_settings
val set_size_pie_inner_radius : d3pie_size_radius_value -> d3pie_settings -> d3pie_settings
val set_size_pie_outer_radius : d3pie_size_radius_value -> d3pie_settings -> d3pie_settings
val set_inner_label_format : d3pie_label_format_value -> d3pie_settings -> d3pie_settings
val set_outer_label_format : d3pie_label_format_value -> d3pie_settings -> d3pie_settings
val set_tooltip_caption : d3pie_settings -> d3pie_settings
val set_load_effect : d3pie_load_effect -> d3pie_settings -> d3pie_settings
val set_segment_on_click_effect : d3pie_segment_on_click_effect -> d3pie_settings -> d3pie_settings
val set_on_click_callback : (d3pie_callback_argument -> unit) -> d3pie_settings -> d3pie_settings
val set_on_mouseover_callback : (d3pie_callback_argument -> unit) -> d3pie_settings -> d3pie_settings
val set_on_mouseout_callback : (d3pie_callback_argument -> unit) -> d3pie_settings -> d3pie_settings
val set_small_segment_grouping : d3pie_small_segment_grouping_type -> int -> string -> string -> d3pie_settings -> d3pie_settings
val unset_small_segment_grouping : d3pie_settings -> d3pie_settings
val set_segments_colors : string array -> d3pie_settings -> d3pie_settings
val set_segment_stroke_color : string -> d3pie_settings -> d3pie_settings
OCaml

Innovation. Community. Security.