handle2 methods
Crosshair
Returned by area:crosshair(...). The active hover crosshair on one plot area — reconfigure it in place or remove it.
- Obtained from
PlotArea:crosshair
The examples on this page start from:
Methods 2
Crosshair:update
methodReconfigure the crosshair in place. Raises after remove.
Example
crosshair:update({ readout = false, line_color = color("#e67e80") })
options chart.CrosshairOptions options 5 keys Omitted keys keep their current value.
| Key | Type | Description |
|---|
| lines | boolean | Draw the crosshair lines. |
| line_color | Color | Crosshair line color. |
| readout | boolean | Show the value readout. |
| readout_color | Color | Readout text color. |
| mark_values | boolean | Highlight nearest mark values. |
Crosshair:remove
methodCrosshair:remove()
Remove the crosshair and everything it draws. The area can then construct a new one. Safe to call more than once.