package chartjs

  1. Overview
  2. Docs

Module ChartjsSource

Sourcemodule Indexable : sig ... end
Sourcemodule Scriptable : sig ... end
Sourcemodule Scriptable_indexable : sig ... end
Sourcemodule Line_cap : sig ... end
Sourcemodule Line_join : sig ... end
Sourcemodule Interaction_mode : sig ... end
Sourcemodule Point_style : sig ... end
Sourcemodule Easing : sig ... end
Sourcemodule Padding : sig ... end
Sourcemodule Color : sig ... end
Sourcemodule Position : sig ... end
Sourcemodule Tooltip_position : sig ... end
Sourcemodule Line_height : sig ... end
Sourcemodule Hover_axis : sig ... end
Sourcemodule Fill : sig ... end
Sourcemodule Time : sig ... end
Sourcemodule Or_false : sig ... end
Sourcemodule Time_ticks_source : sig ... end
Sourcemodule Time_distribution : sig ... end
Sourcemodule Time_bounds : sig ... end
Sourcemodule Time_unit : sig ... end
Sourcemodule Interpolation_mode : sig ... end
Sourcemodule Stepped_line : sig ... end
Sourcemodule Line_fill : sig ... end
Sourcemodule Pie_border_align : sig ... end
Sourcemodule Axis_display : sig ... end
Sourcemodule Time_parser : sig ... end
Sourcemodule Bar_thickness : sig ... end
Sourceclass type ['x, 'y] dataPoint = object ... end
Sourceclass type ['t, 'y] dataPointT = object ... end
Sourceclass type ['x, 'y, 'r] dataPointR = object ... end
Sourceval create_data_point : x:'a -> y:'b -> ('a, 'b) dataPoint Js_of_ocaml.Js.t
Sourceval create_data_point_t : t:'a -> y:'b -> ('a, 'b) dataPointT Js_of_ocaml.Js.t
Sourceval create_data_point_r : x:'a -> y:'b -> r:'c -> ('a, 'b, 'c) dataPointR Js_of_ocaml.Js.t

Axes

Sourceclass type minorTicks = object ... end

The minorTick configuration is nested under the ticks configuration in the minor key. It defines options for the minor tick marks that are generated by the axis. Omitted options are inherited from ticks configuration.

The majorTick configuration is nested under the ticks configuration in the major key. It defines options for the major tick marks that are generated by the axis. Omitted options are inherited from ticks configuration. These options are disabled by default.

Sourceclass type ticks = object ... end

The tick configuration is nested under the scale configuration in the ticks key. It defines options for the tick marks that are generated by the axis.

Sourceclass type scaleLabel = object ... end
Sourceclass type gridLines = object ... end
Sourceclass type axis = object ... end
Sourceval empty_minor_ticks : unit -> minorTicks Js_of_ocaml.Js.t
Sourceval empty_major_ticks : unit -> majorTicks Js_of_ocaml.Js.t
Sourceval empty_ticks : unit -> ticks Js_of_ocaml.Js.t
Sourceval empty_scale_label : unit -> scaleLabel Js_of_ocaml.Js.t
Sourceval empty_grid_lines : unit -> gridLines Js_of_ocaml.Js.t

Cartesian axes

Sourceclass type cartesianTicks = object ... end
Sourceclass type cartesianAxis = object ... end
Sourceval empty_cartesian_axis : unit -> cartesianAxis Js_of_ocaml.Js.t

Category axis

Sourceclass type categoryTicks = object ... end
Sourceclass type categoryAxis = object ... end
Sourceval empty_category_ticks : unit -> categoryTicks Js_of_ocaml.Js.t
Sourceval empty_category_axis : unit -> categoryAxis Js_of_ocaml.Js.t

Linear axis

Sourceclass type linearTicks = object ... end
Sourceclass type linearAxis = object ... end
Sourceval empty_linear_ticks : unit -> linearTicks Js_of_ocaml.Js.t
Sourceval empty_linear_axis : unit -> linearAxis Js_of_ocaml.Js.t

Logarithmic axis

Sourceclass type logarithmicTicks = object ... end
Sourceclass type logarithmicAxis = object ... end
Sourceval empty_logarithmic_ticks : unit -> logarithmicTicks Js_of_ocaml.Js.t
Sourceval empty_logarithmic_axis : unit -> logarithmicAxis Js_of_ocaml.Js.t

Time axis

Sourceclass type timeDisplayFormats = object ... end

The following display formats are used to configure how different time units are formed into strings for the axis tick marks.

Sourceclass type timeTicks = object ... end
Sourceclass type timeOptions = object ... end
Sourceclass type timeAxis = object ... end
Sourceval empty_time_display_formats : unit -> timeDisplayFormats Js_of_ocaml.Js.t
Sourceval empty_time_ticks : unit -> timeTicks Js_of_ocaml.Js.t
Sourceval empty_time_options : unit -> timeOptions Js_of_ocaml.Js.t
Sourceval empty_time_axis : unit -> timeAxis Js_of_ocaml.Js.t
Sourceclass type dataset = object ... end
Sourceclass type data = object ... end
Sourceval empty_data : unit -> data Js_of_ocaml.Js.t

Chart configuration

Sourceclass type updateConfig = object ... end

Animation

Sourceclass type animationItem = object ... end
Sourceclass type animation = object ... end

Layout

Sourceclass type layout = object ... end

Legend

Sourceclass type legendItem = object ... end
Sourceclass type legendLabels = object ... end
Sourceclass type legend = object ... end

Title

Sourceclass type title = object ... end

Tooltip

Sourceclass type tooltipItem = object ... end
Sourceclass type tooltipBodyLines = object ... end
Sourceclass type tooltipModel = object ... end
Sourceclass type tooltipCallbacks = object ... end
Sourceclass type tooltip = object ... end

Interactions

Sourceclass type hover = object ... end

Elements

Sourceclass type pointElement = object ... end
Sourceclass type lineElement = object ... end
Sourceclass type rectangleElement = object ... end
Sourceclass type arcElement = object ... end
Sourceclass type elements = object ... end

Options

Sourceclass type chartSize = object ... end

Chart

Sourceclass type chartOptions = object ... end

The configuration is used to change how the chart behaves. There are properties to control styling, fonts, the legend, etc.

Sourceclass type chartConfig = object ... end
Sourceclass type chart = object ... end
Sourceval empty_animation : unit -> animation Js_of_ocaml.Js.t
Sourceval empty_layout : unit -> layout Js_of_ocaml.Js.t
Sourceval empty_legend_labels : unit -> legendLabels Js_of_ocaml.Js.t
Sourceval empty_legend : unit -> legend Js_of_ocaml.Js.t
Sourceval empty_title : unit -> title Js_of_ocaml.Js.t
Sourceval empty_tooltip_model : unit -> tooltipModel Js_of_ocaml.Js.t
Sourceval empty_tooltip_callbacks : unit -> tooltipCallbacks Js_of_ocaml.Js.t
Sourceval empty_tooltip : unit -> tooltip Js_of_ocaml.Js.t
Sourceval empty_hover : unit -> hover Js_of_ocaml.Js.t
Sourceval empty_point_element : unit -> pointElement Js_of_ocaml.Js.t
Sourceval empty_line_element : unit -> lineElement Js_of_ocaml.Js.t
Sourceval empty_rectangle_element : unit -> rectangleElement Js_of_ocaml.Js.t
Sourceval empty_arc_element : unit -> arcElement Js_of_ocaml.Js.t
Sourceval empty_elements : unit -> elements Js_of_ocaml.Js.t
Sourceval empty_update_config : unit -> updateConfig Js_of_ocaml.Js.t

Charts

Line Chart

Sourceclass type 'a lineOptionContext = object ... end
Sourceclass type lineScales = object ... end
Sourceclass type lineOptions = object ... end
Sourceclass type lineConfig = object ... end
Sourceclass type 'a lineDataset = object ... end
Sourceclass type lineChart = object ... end
Sourceval empty_line_scales : unit -> lineScales Js_of_ocaml.Js.t
Sourceval empty_line_options : unit -> lineOptions Js_of_ocaml.Js.t
Sourceval empty_line_dataset : unit -> 'a lineDataset Js_of_ocaml.Js.t

Bar Chart

Sourceclass type barAxis = object ... end
Sourceclass type cateroryBarAxis = object ... end
Sourceclass type linearBarAxis = object ... end
Sourceclass type logarithmicBarAxis = object ... end
Sourceclass type timeBarAxis = object ... end
Sourceclass type barScales = object ... end
Sourceclass type 'a barOptionContext = object ... end
Sourceclass type barOptions = object ... end
Sourceclass type barConfig = object ... end
Sourceclass type 'a barDataset = object ... end
Sourceclass type barChart = object ... end
Sourceval empty_bar_axis : unit -> cateroryBarAxis Js_of_ocaml.Js.t
Sourceval empty_linear_bar_axis : unit -> linearBarAxis Js_of_ocaml.Js.t
Sourceval empty_logarithmic_bar_axis : unit -> logarithmicBarAxis Js_of_ocaml.Js.t
Sourceval empty_time_bar_axis : unit -> timeBarAxis Js_of_ocaml.Js.t
Sourceval empty_bar_scales : unit -> barScales Js_of_ocaml.Js.t
Sourceval empty_bar_options : unit -> barOptions Js_of_ocaml.Js.t
Sourceval empty_bar_dataset : unit -> 'a barDataset Js_of_ocaml.Js.t

Pie Chart

Sourceclass type 'a pieOptionContext = object ... end
Sourceclass type pieAnimation = object ... end
Sourceclass type pieOptions = object ... end
Sourceclass type pieConfig = object ... end
Sourceclass type 'a pieDataset = object ... end
Sourceclass type pieChart = object ... end
Sourceval empty_pie_animation : unit -> pieAnimation Js_of_ocaml.Js.t
Sourceval empty_pie_options : unit -> pieOptions Js_of_ocaml.Js.t
Sourceval empty_pie_dataset : unit -> 'a pieDataset Js_of_ocaml.Js.t
Sourcemodule Axis : sig ... end
Sourcemodule Chart : sig ... end

Type Coercion

Sourcemodule CoerceTo : sig ... end

Creating an Axis

Sourceval create_axis : 'a Axis.typ -> 'a Js_of_ocaml.Js.t

Creating a Chart

OCaml

Innovation. Community. Security.