Class type Chartjs.lineDataset

inherit dataset
method data : 'a Js_of_ocaml.Js.js_array Js_of_ocaml.Js.t Js_of_ocaml.Js.prop

General

method xAxisID : Js_of_ocaml.Js.js_string Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

The ID of the x axis to plot this dataset on.

method yAxisID : Js_of_ocaml.Js.js_string Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

The ID of the y axis to plot this dataset on.

Point styling

method pointBackgroundColor : ('a lineOptionContext Js_of_ocaml.Js.tColor.t Js_of_ocaml.Js.t) Scriptable_indexable.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

The fill color for points.

method pointBorderColor : ('a lineOptionContext Js_of_ocaml.Js.tColor.t Js_of_ocaml.Js.t) Scriptable_indexable.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

The border color for points.

method pointBorderWidth : ('a lineOptionContext Js_of_ocaml.Js.t, int) Scriptable_indexable.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

The width of the point border in pixels.

method pointHitRadius : ('a lineOptionContext Js_of_ocaml.Js.t, int) Scriptable_indexable.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

The pixel size of the non-displayed point that reacts to mouse events.

method pointRadius : ('a lineOptionContext Js_of_ocaml.Js.t, int) Scriptable_indexable.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

The radius of the point shape. If set to 0, the point is not rendered.

method pointRotation : ('a lineOptionContext Js_of_ocaml.Js.t, int) Scriptable_indexable.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

The rotation of the point in degrees.

method pointStyle : Point_style.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

Style of the point.

Line styling

method backgroundColor : Color.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

The line fill color.

method borderCapStyle : Line_cap.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

Cap style of the line.

method borderColor : Color.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

The line color.

method borderDash : line_dash Js_of_ocaml.Js.optdef_prop

Length and spacing of dashes.

method borderDashOffset : line_dash_offset Js_of_ocaml.Js.optdef_prop

Offset for line dashes.

method borderJoinStyle : Line_join.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

Line joint style.

method borderWidth : int Js_of_ocaml.Js.optdef_prop

The line width (in pixels).

method fill : Line_fill.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

How to fill the area under the line.

method lineTension : float Js_of_ocaml.Js.optdef_prop

Bezier curve tension of the line. Set to 0 to draw straightlines. This option is ignored if monotone cubic interpolation is used.

method showLine : bool Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

If false, the line is not drawn for this dataset.

method spanGaps : bool Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

If true, lines will be drawn between points with no or null data. If false, points with NaN data will create a break in the line.

Interactions

method pointHoverBackgroundColor : ('a lineOptionContext Js_of_ocaml.Js.tColor.t Js_of_ocaml.Js.t) Scriptable_indexable.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

Point background color when hovered.

method pointHoverBorderColor : ('a lineOptionContext Js_of_ocaml.Js.tColor.t Js_of_ocaml.Js.t) Scriptable_indexable.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

Point border color when hovered.

method pointHoverBorderWidth : ('a lineOptionContext Js_of_ocaml.Js.t, int) Scriptable_indexable.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

Border width of point when hovered.

method pointHoverRadius : ('a lineOptionContext Js_of_ocaml.Js.t, int) Scriptable_indexable.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

The radius of the point when hovered.

Cubic Interpolation Mode

method cubicInterpolationMode : Interpolation_mode.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

The default and monotone interpolation modes are supported. The default algorithm uses a custom weighted cubic interpolation, which produces pleasant curves for all types of datasets. The monotone algorithm is more suited to y = f(x) datasets : it preserves monotonicity (or piecewise monotonicity) of the dataset being interpolated, and ensures local extremums (if any) stay at input data points. If left untouched (undefined), the global options.elements.line.cubicInterpolationMode property is used.

Stepped Line

method steppedLine : Stepped_line.t Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef_prop

The following values are supported for steppedLine. false: No Step Interpolation (default) true: Step-before Interpolation (eq. 'before') 'before': Step-before Interpolation 'after': Step-after Interpolation 'middle': Step-middle Interpolation If the steppedLine value is set to anything other than false, lineTension will be ignored.