Skip to content

Line

Reference

Line elements are used to represent the line in a line chart.

Namespace: options.elements.line

1
2
3
.Options(o => o
    .Elements(e => e
        .Line().Tension(0.2).Fill(true)))

Base Element Settings

BackgroundColor

Fill color.

.BackgroundColor("blue")

BorderWidth

Stroke width.

.BorderWidth(1)

BorderColor

Stroke color.

.BorderColor("grey")

Line Element Settings

Tension

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

.Tension(0.4)

BorderCapStyle

Line cap style. Default 'butt'.

.BorderCapStyle(CapStyle.Round)

BorderDash

Line dash.

.BorderDash(5, 15, 25)

BorderDashOffset

Line dash offset. Default 0.0

.BorderDashOffset(0.1)

BorderJoinStyle

Line join style. Default 'miter'

.BorderJoinStyle(JoinStyle.Bevel)

CapBezierPoints

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

.CapBezierPoints(true)

CubicInterpolationMode

Interpolation mode to apply. Default 'default'

.CubicInterpolationMode("monotone")

Fill

How to fill the area under the line. Default false

.Fill(true)
.Fill("origin")

Stepped

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

.Stepped(true)