Line chart options
LineChartOptions API. Configure series, axes, interaction, animation, labels, overlays, and LOD.
import type { LineChartOptions } from "@sixtyfold/line";Use the public entry point shown above.
BandOptions
Range/band-specific visual options
Import @sixtyfold/line·interface
interface BandOptions| Member | Definition | Description |
|---|---|---|
border | string | undefined | Shared border color for upper and lower boundaries (defaults to series color when a border is enabled) |
border | BandBorderStyle | undefined= solid | Border line style |
border | number | undefined | Border width in pixels. Set to 0 to disable borders. |
fill? | number | boolean | undefined | Fill the band. - false: no band fill - true: fill with series color at default opacity - number (0-1): fill with series color at specified opacity |
fill | string | SeriesGradient | undefined | Band fill color - solid color string or gradient object. Overrides the fill opacity if specified |
lower | string | undefined | Override color for the lower boundary |
upper | string | undefined | Override color for the upper boundary |
BarOptions
Bar/column-specific visual options
Import @sixtyfold/line·interface
interface BarOptions| Member | Definition | Description |
|---|---|---|
baseline? | number | undefined= 0 | Data value that bars grow from |
border | string | undefined | Shared bar border color (defaults to series color when a border is enabled) |
border | BarBorderStyle | undefined= solid | Border line style |
border | number | undefined | Border width in pixels. Set to 0 to disable borders. |
fill? | number | boolean | undefined | Fill the bars. - false: no bar fill - true: fill with series color at default opacity - number (0-1): fill with series color at specified opacity |
fill | string | SeriesGradient | undefined | Bar fill color - solid color string or gradient object. Overrides the fill opacity if specified |
max | number | undefined= 24 | Maximum bar width in pixels |
min | number | undefined= 1 | Minimum bar width in pixels |
width | number | undefined= 0.7 | Fraction of the available sample spacing used by each bar |
LegendLabelFontOptions
Options for legend label font.
Import @sixtyfold/line·interface
interface LegendLabelFontOptionsLegendOptions
Placement, layout, typography, swatches, and interaction for the built-in Canvas2D legend.
Import @sixtyfold/line·interface
interface LegendOptions| Member | Definition | Description |
|---|---|---|
align? | LegendAlign | undefined= center | Alignment in the legend area |
allow | boolean | undefined= false | Allow hiding all series |
inactive | number | undefined= 0.45 | Opacity for hidden series legend items |
interactive? | boolean | undefined= false | Enable click-to-toggle interaction |
item | number | undefined= 12 | Gap between items in px |
label | LegendLabelFontOptions | undefined | Legend label font style |
layout? | LegendLayout | undefined= column | Item layout |
padding? | { top?: number; right?: number; bottom?: number; left?: number; } | undefined= 8 | Padding inside legend area in px |
position? | LegendPosition | undefined= right | Legend position around chart area |
swatch? | LegendSwatchOptions | undefined | Swatch style options |
swatch | number | undefined= 6 | Gap between swatch and label in px |
visible? | boolean | undefined | Show the legend. Defaults to true when legend is provided; omitting legend disables it. |
LegendSwatchOptions
Options for legend swatch.
Import @sixtyfold/line·interface
interface LegendSwatchOptions| Member | Definition | Description |
|---|---|---|
border | string | undefined= transparent | Swatch border color |
border | number | undefined= 0 | Swatch border width in px |
shape? | LegendSwatchShape | undefined= circle | Swatch shape |
size? | number | undefined= 10 | Swatch size in px |
LineAppearanceOptions
Line chart appearance — base appearance + legend + marker
Import @sixtyfold/line·interface
interface LineAppearanceOptions extends BaseAppearanceOptions| Member | Definition | Description |
|---|---|---|
axis? | AxisAppearanceOptions | undefined | Runtime appearance options for axis. |
chart | BackgroundOptions | undefined | Runtime appearance options for chart background. |
crosshair | CrosshairOptions | undefined | Runtime appearance options for crosshair style. |
grid? | GridOptions | undefined | Runtime appearance options for grid. |
labels? | ChartLabels | undefined | Runtime appearance options for labels. |
legend? | LegendOptions | undefined | Runtime appearance options for legend. |
marker? | MarkerOptions | undefined | Runtime appearance options for marker. |
overlay? | OverlayOptions | undefined | Runtime appearance options for overlay. |
padding? | PaddingOptions | undefined | Runtime appearance options for padding. |
range | RangeSelectorAppearanceOptions | undefined | Runtime appearance options for range selector. |
selection? | SelectionOptions | undefined | Runtime appearance options for selection. |
text | TextDirection | undefined | Runtime appearance options for text direction. |
tooltip? | TooltipOptions | undefined | Runtime appearance options for tooltip. |
LineChartOptions
Construction, interaction, appearance, series, and LOD options for a line chart.
Import @sixtyfold/line·interface
interface LineChartOptions| Member | Definition | Description |
|---|---|---|
animated? | boolean | undefined | Animate data reveal and viewport/axis transitions. When omitted, animation is enabled unless the browser reports prefers-reduced-motion: reduce. |
axis? | AxisOptions | undefined | Axis customization (line color and label colors) |
chart | BackgroundOptions | undefined= #16213e | Chart background (covers entire canvas including preview area). Can be a solid color string, gradient definition, or image. |
crosshair | CrosshairOptions | undefined | Crosshair lines styling (vertical and horizontal guide lines) |
grid? | GridOptions | undefined | Grid line customization for main chart |
interactive? | boolean | undefined= true | Enable user interactions (pan/zoom/pinch). When false, chart is view-only but still shows crosshair/tooltip on hover. |
interpolation? | "none" | "linear" | "spline" | undefined= linear | Interpolation mode for values between data points - 'none': no interpolation, snap to nearest data point - 'linear': linear interpolation between adjacent points - 'spline': Catmull-Rom spline interpolation for smooth curves |
keep | number | undefined= 0 (disabled) | Keep-alive interval in seconds to prevent Safari from releasing GPU resources. Safari aggressively cleans up "unused" canvases, causing blank charts. |
keyboard | "focus" | "hover" | undefined | How keyboard controls become active. - "focus" (default): chart must have DOM focus - "hover": chart under the mouse pointer receives keyboard navigation |
keyboard | false | KeyboardAnnouncementMessages | undefined | Localize keyboard-action announcements for assistive technologies, or set false to disable them. Omitted messages use concise English defaults. |
keyboard | number | undefined= 0.1 (10%) | Keyboard pan speed (arrow keys). Fraction of visible range to pan per keypress.1 (10%) |
keyboard | number | undefined= 0.1 (10% per keypress) | Keyboard zoom speed (+/- keys). Higher values = faster zoom.1 (10% per keypress) |
labels? | ChartLabels | undefined | Text labels around the chart (title, axis labels) |
legend? | LegendOptions | undefined | Series legend options |
lod? | LineLODOptions | undefined | Level-of-detail presentation policy. |
marker? | MarkerOptions | undefined | Default marker style for hover points (can be overridden per-series) |
min | number | undefined | Smallest interactive X viewport span, expressed in the same units as the chart's X values. Invalid or non-positive values retain the chart-type default. This construction option is not part of mutable appearance. |
overlay? | OverlayOptions | undefined | Declarative overlay primitives rendered above chart content |
padding? | PaddingOptions | undefined= { top: 20, right: 80, bottom: 40, left: 80 } | Custom padding in pixels |
range | RangeSelectorOptions | undefined | Range selector (preview chart) configuration |
renderer | number | undefined= 15000 | Maximum time in milliseconds allowed for renderer startup. The watchdog starts during chart construction, so it also protects applications that do not await BaseChart.initialize. Set to 0 to disable it. |
render | "auto" | "worker" | "main" | undefined | Rendering mode selection. - "auto": prefer worker+OffscreenCanvas when supported (default) - "worker": force worker rendering (falls back to main if unsupported) - "main": render on the browser main thread (requires a DOM; useful for fallbacks and tests) |
selection? | SelectionOptions | undefined | Selection range (drag-to-zoom) styling |
series? | SeriesOptions[] | undefined | Per-series configuration (colors, fill, gradients) |
text | TextDirection | undefined= inherit | Direction used for Canvas2D text. Use "auto" to infer from the first strong character of each string, or "rtl"/"ltr" to force a chart-wide direction. |
tooltip? | TooltipOptions | undefined | Tooltip (crosshair info box) styling |
wheel | "up-in" | "up-out" | undefined | Mouse wheel zoom direction. - "up-in" (default): wheel up/backward zooms in, wheel down/forward zooms out - "up-out": wheel up/backward zooms out, wheel down/forward zooms in |
wheel | number | undefined= 0.1 (10% per wheel tick) | Mouse wheel zoom speed. Higher values = faster zoom.1 (10% per wheel tick) |
y | YDomainOptions | undefined | Pin either or both edges of the rendered Y domain. Omitted edges continue to auto-scale from visible data. Supplying both finite edges keeps the Y viewport stable across zoom, LOD selection, and streaming updates. The option is disabled by default and is construction configuration rather than mutable appearance. |
LineChartStatsOptions
Controls how frequently line telemetry is published.
Import @sixtyfold/line·interface
interface LineChartStatsOptionsLineDataUpdateOptions
Controls the animated transition used for a bulk line-data replacement.
Import @sixtyfold/line·interface
interface LineDataUpdateOptionsLineLODOptions
Stable screen-space presentation policy and fidelity/smoothness coefficients.
Import @sixtyfold/line·interface
interface LineLODOptionsMarkerGlowOptions
Optional glow effect for hover markers
Import @sixtyfold/line·interface
interface MarkerGlowOptionsMarkerOptions
Marker options for hover point indicators
Import @sixtyfold/line·interface
interface MarkerOptions| Member | Definition | Description |
|---|---|---|
border | string | undefined= #fff | Border/stroke color |
border | number | undefined= 1 | Border/stroke width in pixels |
glow? | boolean | MarkerGlowOptions | undefined | Optional glow around the marker |
shape? | MarkerShape | undefined= circle | Marker shape |
size? | number | undefined= 5 | Marker size in pixels — radius for circle, half-width for others |
PointOptions
Scatter/points-specific visual options
Import @sixtyfold/line·interface
interface PointOptions| Member | Definition | Description |
|---|---|---|
border | string | undefined= #fff | Point border/stroke color |
border | number | undefined= 0 | Point border/stroke width in pixels |
color? | string | undefined | Point fill color (defaults to series color) |
opacity? | number | undefined= 1 | Point opacity 0-1 |
shape? | MarkerShape | undefined= circle | Point shape |
size? | number | undefined= 3 | Point size in pixels — radius for circle, half-width for others |
SeriesAppearanceOptions
Per-series appearance fields — visual + presentation only
Import @sixtyfold/line·type
type SeriesAppearanceOptions = Pick<SeriesOptions, "type" | "color" | "fill" | "fillColor" | "fillToZero" | "fillEffect" | "band" | "bar" | "stack" | "point" | "width" | "name" | "unit" | "marker">| Member | Definition | Description |
|---|---|---|
band? | BandOptions | undefined | Range/band-specific fill and border styling |
bar? | BarOptions | undefined | Bar/column-specific fill, border, width, and baseline styling |
color? | string | undefined | Line color (falls back to default palette if not specified) |
fill? | number | boolean | undefined | Fill the area under the line. - false: no fill (default) - true: fill with line color at 40% opacity - number (0-1): fill with line color at specified opacity |
fill | string | SeriesGradient | undefined | Fill color - solid color string or gradient object. Overrides the fill opacity if specified |
fill | "none" | "glow" | "layered" | undefined | Fill style effect - 'none': flat color fill (default) - 'glow': soft glow emanating from the line - 'layered': stacked fills with varying opacity for depth |
fill | boolean | undefined= true | Fill to zero baseline instead of chart bottom When true: positive values fill down to zero, negative fill up to zero When false: always fill to chart bottom |
marker? | MarkerOptions | undefined | Marker style for this series' hover point (overrides chart-level marker) |
name? | string | undefined | Series display name (used in legend and tooltip). |
point? | PointOptions | undefined | Scatter/points-specific marker styling |
stack? | StackOptions | undefined | Stacked-area-specific fill and top-boundary styling |
type? | LineSeriesType | undefined= line | Series drawing style. "step" is an alias for "step-after"; "band" is an alias for "range"; "points" is an alias for "scatter"; "column" is an alias for "bar"; "stackedArea" is an alias for "stacked-area". |
unit? | UnitOptions | undefined | Unit configuration for this series (used in tooltip and axis labels) |
width? | number | undefined= 1.5 | Line stroke width in pixels. Set to 0 to suppress the stroke while retaining range fills, tooltips, and other series layers. |
SeriesGradient
Gradient definition for series fill
Import @sixtyfold/line·interface
interface SeriesGradientSeriesOptions
Configuration for a single series
Import @sixtyfold/line·interface
interface SeriesOptions| Member | Definition | Description |
|---|---|---|
band? | BandOptions | undefined | Range/band-specific fill and border styling |
bar? | BarOptions | undefined | Bar/column-specific fill, border, width, and baseline styling |
color? | string | undefined | Line color (falls back to default palette if not specified) |
fill? | number | boolean | undefined | Fill the area under the line. - false: no fill (default) - true: fill with line color at 40% opacity - number (0-1): fill with line color at specified opacity |
fill | string | SeriesGradient | undefined | Fill color - solid color string or gradient object. Overrides the fill opacity if specified |
fill | "none" | "glow" | "layered" | undefined | Fill style effect - 'none': flat color fill (default) - 'glow': soft glow emanating from the line - 'layered': stacked fills with varying opacity for depth |
fill | boolean | undefined= true | Fill to zero baseline instead of chart bottom When true: positive values fill down to zero, negative fill up to zero When false: always fill to chart bottom |
marker? | MarkerOptions | undefined | Marker style for this series' hover point (overrides chart-level marker) |
name? | string | undefined | Series display name (used in legend and tooltip). |
point? | PointOptions | undefined | Scatter/points-specific marker styling |
stack? | StackOptions | undefined | Stacked-area-specific fill and top-boundary styling |
type? | LineSeriesType | undefined= line | Series drawing style. "step" is an alias for "step-after"; "band" is an alias for "range"; "points" is an alias for "scatter"; "column" is an alias for "bar"; "stackedArea" is an alias for "stacked-area". |
unit? | UnitOptions | undefined | Unit configuration for this series (used in tooltip and axis labels) |
width? | number | undefined= 1.5 | Line stroke width in pixels. Set to 0 to suppress the stroke while retaining range fills, tooltips, and other series layers. |
StackOptions
Stacked-area-specific visual options
Import @sixtyfold/line·interface
interface StackOptions| Member | Definition | Description |
|---|---|---|
border | string | undefined | Top boundary color (defaults to series color) |
border | StackBorderStyle | undefined= solid | Top boundary line style |
border | number | undefined | Top boundary width in pixels (defaults to series width). Set to 0 to disable. |
curve? | StackCurveStyle | undefined= linear | Boundary shape for the filled band and top border. |
fill? | number | boolean | undefined | Fill the stacked area. - false: no area fill - true: fill with series color at default opacity - number (0-1): fill with series color at specified opacity |
fill | string | SeriesGradient | undefined | Area fill color - solid color string or gradient object. Overrides the fill opacity if specified |