Line

Line :: # (opaque)

A finite, nonnegative line width and its CSS style.

default : Line

A solid, two-pixel-wide line in Plotly blue.

new : Props -> Try(Line, [InvalidLineWidth(F64)])

Validate a line width and construct its style. A negative or nonfinite width returns InvalidLineWidth(width). Zero is accepted for a hidden stroke.

dash_to_str : Type -> Str

Return the canonical Plotly dash name, such as "longdashdot". Use tags in props; this conversion is useful when inspecting a style.

to_json_value : Line -> InternalJson

Internal composition hook used by Plume's renderers. Applications normally use Line.to_json for complete JSON text; this returns the package's safe internal value without accepting raw JSON.

to_json : Line -> Str

Serialize this validated value as a complete JSON document.

Type : [Solid, Dot, Dash, LongDash, DashDot, LongDashDot]

Choose a connected line's dash pattern. Solid draws a continuous line. The other tags select dots, short or long dashes, and their combinations in Plotly's canonical order.

Shape : [Linear, StepAfter, StepBefore, StepMiddle]

Choose how a line travels between consecutive points. Linear draws straight segments. The step shapes draw only horizontal and vertical segments, for values that hold between samples: StepAfter keeps each value until the next point (Plotly hv), StepBefore takes the next value immediately (vh), and StepMiddle changes value halfway between the points (hvh). Every shape is available to both scatter renderers.

Props

:= {
    width : F64 ?? 2,
    color : Color ?? Color.rgb({ red: 31, green: 119, blue: 180 }),
    dash : Type ?? Solid,
    shape : Shape ?? Linear,
}

Style the connected segments of a scatter trace. width is measured in pixels, must be finite and nonnegative, and defaults to two. Zero hides the stroke. color defaults to Plotly blue, dash defaults to Solid and shape defaults to Linear.