Layout

Layout :: # (opaque)

A chart's layout is independent of its trace coordinate types.

new : Props -> Layout

Construct a layout from already validated settings. This function is infallible. Combine Title.new, Font.new and Axis.new when the corresponding presentation needs an override.

get_title : Layout -> Str

Title for a generated HTML document, with a display fallback when no explicit title exists. This does not add a Plotly chart title.

to_json_value : Layout -> InternalJson

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

to_json : Layout -> Str

Serialize this validated value as a complete JSON document.

Props

:= {
    global_font : Font ?? Font.default,
    title : Title ?? Title.default,
    x_axis : Axis ?? Axis.default,
    y_axis : Axis ?? Axis.default,
    legend : [Shown, Hidden] ?? Hidden,
}

Configure shared chart presentation. global_font supplies text styling for the chart; title supplies its visible title. x_axis and y_axis configure Cartesian axes. Their defaults inherit Plotly settings. legend: Hidden suppresses the legend by default; use Shown to display trace names.