Skip to main content
Module

x/fresh_charts/deps.ts>ChartJs.LineOptions

A server-side-rendered charting library for Fresh
Go to Latest
interface ChartJs.LineOptions
import { type ChartJs } from "https://deno.land/x/fresh_charts@0.2.2/deps.ts";
const { LineOptions } = ChartJs;

Properties

borderCapStyle: CanvasLineCap

Line cap style. See MDN.

borderDash: number[]

Line dash. See MDN.

borderDashOffset: number

Line dash offset. See MDN.

borderJoinStyle: CanvasLineJoin

Line join style. See MDN.

capBezierPoints: boolean

true to keep Bézier control inside the chart, false for no restriction.

cubicInterpolationMode: "default" | "monotone"

Interpolation mode to apply.

tension: number

Bézier curve tension (0 for no Bézier curves).

stepped:
| "before"
| "after"
| "middle"
| boolean

true to show the line as a stepped line (tension will be ignored).

Both line and radar charts support a fill option on the dataset object which can be used to create area between two datasets or a dataset and a boundary, i.e. the scale origin, start or end

spanGaps: boolean | number

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. Can also be a number specifying the maximum gap length to span. The unit of the value depends on the scale used.

segment: { backgroundColor: Scriptable<Color | undefined, ScriptableLineSegmentContext>; borderColor: Scriptable<Color | undefined, ScriptableLineSegmentContext>; borderCapStyle: Scriptable<CanvasLineCap | undefined, ScriptableLineSegmentContext>; borderDash: Scriptable<number[] | undefined, ScriptableLineSegmentContext>; borderDashOffset: Scriptable<number | undefined, ScriptableLineSegmentContext>; borderJoinStyle: Scriptable<CanvasLineJoin | undefined, ScriptableLineSegmentContext>; borderWidth: Scriptable<number | undefined, ScriptableLineSegmentContext>; }