> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperwisor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Spectral Graph

> A spectral (wavelength) intensity graph, driven from a sensor.

<Info>
  **Category:** Display · **Reads data:** yes (spectrum) · **Sends commands:** no
</Info>

## Mental model

A **Spectral Graph is a spectrometer readout.** It plots intensity across a
wavelength range — for spectral sensors (color, NIR, light analysis).

## When to use it

* Spectral sensor output
* Wavelength-vs-intensity plots

## Settings

### General / Style

* **Chart type** · **start / end (nm)** — spectrum range
* **Min / Max value** · **auto scale** — Y-axis
* **Data smoothing** · **max data points in history**
* **Show grid** · **current value badge**

## Example — push a spectrum from firmware

```cpp theme={null}
device.updateWidget(targetId, "spectrum", std::vector<float>{ /* per-band intensities */ });
```

## Script API example

The same interactions from a [dashboard script](/script/overview):

```js theme={null}
ws.onMessage((msg) => {
  if (Array.isArray(msg.spectrum)) widget.setValue('spectrum', msg.spectrum);
});
```

<Card title="EM Spectrum" icon="wave-square" href="/dashboard/widgets/em-spectrum">
  For a band-position display.
</Card>
