Skip to content
Version 2.11.0
↓ Get the launcher

LineChartElement record

Multi-series time-series line chart with labelled X/Y axes, axis titles, a legend, and an interactive visible-range (zoom/pan) window. The plugin owns the data and the visible window; the framework draws axes, grid, ticks, and lines, auto-scaling Y to the visible window’s peak (unless YMaxOverride returns a value). BCL-only: no Unity types in the contract.

public record LineChartElement : IEquatable<HudElement>
name description
LineChartElement(…) Multi-series time-series line chart with labelled X/Y axes, axis titles, a legend, and an interactive visible-range (zoom/pan) window. The plugin owns the data and the visible window; the framework draws axes, grid, ticks, and lines, auto-scaling Y to the visible window’s peak (unless YMaxOverride returns a value). BCL-only: no Unity types in the contract.
BucketSeconds { get; set; } Seconds represented by one bucket index (X spacing).
FillWidth { get; set; } When true the chart stretches to fill its parent cell’s width instead of fixing to Width (which then acts only as the minimum/initial width). The renderer reads the plot’s laid-out width each refresh and re-meshes when it changes, so the plot, axes, legend, and navigator reflow to the available width — including live as a resizable window’s grip is dragged (at the refresh rate). Height stays fixed to Height. Defaults false (fixed-width).
FormatX { get; set; } Formats an X value in seconds for a tick label (e.g. 64 → “1:04”).
FormatY { get; set; } Formats a Y value for a tick label (e.g. 18000 → “18k”).
Height { get; set; } Chart height in px.
Series { get; set; } Provider for the current series set; re-pulled on refresh. Return a stable list reference while the underlying data is unchanged (and a new instance when it changes): the renderer diffs this by reference to skip re-meshing, so a provider that allocates a fresh list every call (e.g. a per-call .ToList()) defeats that and re-triangulates on every refresh tick.
SetVisibleRange { get; set; } Called by the renderer’s scroll/drag to update the window.
ShowNavigator { get; set; } When true, the framework draws a Highcharts-style navigator strip beneath the plot + legend: a mini full-range (area-filled) overview of the same Series data (ignoring VisibleRange) with a draggable/resizable brush window that controls VisibleRange (drag middle = pan, drag an edge handle = zoom that edge, double-click = reset to full). The navigator replaces the legacy −/+/Reset button bar + range scrollbar; scroll-wheel zoom and drag-pan on the main plot remain. When false (default) the legacy control strip is drawn.
TitleX { get; set; } X-axis title (e.g. “Encounter time (m:ss)”).
TitleY { get; set; } Y-axis title (e.g. “Damage / sec”); re-pulled on refresh (metric-aware).
VisibleRange { get; set; } Current visible window in seconds (min,max); the renderer clips/scales to it.
Width { get; set; } Chart width in px.
XTicks { get; set; } Number of X ticks.
YMaxOverride { get; set; } Optional fixed Y max; null/returns-null = auto-scale to visible peak.
YTicks { get; set; } Number of Y gridlines/ticks.

Scroll-zoom uses the pointer wheel over the plot. If a chart is nested inside a scrolling container, the host detects the enclosing scroll and suppresses chart scroll-zoom for that chart (the wheel scrolls the container instead) — so the −/+/Reset buttons and the range scrollbar remain the zoom controls there. Prefer not to nest a chart inside a scroll viewport if pointer-wheel zoom is wanted. Drag-to-pan is unaffected by nesting.