Documentation Index
Fetch the complete documentation index at: https://docs.darvas.app/llms.txt
Use this file to discover all available pages before exploring further.
Same-key recreate invalidates old handles
If you callLine("my-line", opts) twice, the second call allocates a new generation. Any handle from the first call silently no-ops on .set() or .delete() - its generation no longer matches the slot.
LineFill source keys are immutable
ALineFill cannot be retargeted to different Line entities after creation. To change source lines, delete the fill and create a new one.
Silent NaN coordinate rendering
AssigningNaN, Infinity, or null to any coordinate in a Line, Box, Label, or Marker causes the entity to become invisible. No error is raised, no console warning - it just disappears.
Persistent Marker vs per-bar plot circles
These look similar but behave completely differently:Marker entity | plot(..., { style: "circles" }) | |
|---|---|---|
| Type | Persistent, keyed | Per-bar time-series |
| Creation | Explicit factory call | Emitted every onBar |
| Position | Fixed at creation coordinate | One dot per bar |
| Use case | Manual annotation on specific bars | Algorithmic per-bar output |
Marker for annotations on specific confirmed historical bars; use plot circles for recurring computed signals.
NaN arithmetic propagation
JavaScriptNaN is infectious - any math operation on NaN returns NaN:
na(x) or nz(x, fallback) to break the chain:
plot() registration must be top-level
plot(name, null, opts) registers the plot series. If you only call plot(name, value) inside onBar without the top-level registration, the visual options (color, linewidth, style) default to chart theme values and can produce unexpected rendering.
Always pair every onBar plot call with a top-level registration:
Entity budget truncation is silent
When you exceed the 500-per-type or 1500-total entity limit, the oldest entities are silently truncated. The chart looks correct for recent bars but missing for old bars. Check the Console panel for budget warning messages.Handles are shallow
A handle{ __key, __gen, __kind } does not hold the entity state - it holds a reference to the slot. Two handles pointing to the same key+gen both mutate the same underlying entity:
Related pages
Troubleshooting
Error messages and fixes.
Entities overview
Slot model and handle API in depth.
NaN handling
na() and nz() reference.