Matrix_charts.OverlaySourceInteractive overlays drawn on top of the chart.
Overlays mutate the Grid.t directly. They require a Layout.t to convert between data and cell coordinates. All position parameters (~x, ~y) are in data coordinates.
val crosshair :
?style:Ansi.Style.t ->
?pattern:Charset.line_pattern ->
Layout.t ->
Grid.t ->
x:float ->
y:float ->
unitcrosshair layout grid ~x ~y draws vertical and horizontal lines through (x, y), spanning the full plot area. style inherits from Theme.t.crosshair. pattern defaults to `Solid.
val marker :
?style:Ansi.Style.t ->
?glyph:string ->
Layout.t ->
Grid.t ->
x:float ->
y:float ->
unitmarker layout grid ~x ~y draws a single glyph at (x, y). style inherits from Theme.t.marker. glyph defaults to "●".
The type for tooltip placement.
`Auto tries `Right, `Left, `Top, `Bottom in order, choosing the position with the least clipping and no overlap with the anchor point.
The type for tooltip border styles.
`Theme: use the theme's tooltip border.`None: no border.`Style s: custom border style.val tooltip :
?style:Ansi.Style.t ->
?border:tooltip_border ->
?padding:int ->
?anchor:tooltip_anchor ->
Layout.t ->
Grid.t ->
x:float ->
y:float ->
string list ->
unittooltip layout grid ~x ~y lines draws a tooltip box anchored at (x, y) containing lines. The tooltip is clamped to the plot region. Does nothing if (x, y) maps outside the plot.
style inherits from Theme.t.tooltip.border defaults to `Theme.padding is interior padding in cells. Defaults to 1. Clamped to >= 0.anchor defaults to `Auto.The type for horizontal text alignment.
The type for vertical text alignment.
val text :
?style:Ansi.Style.t ->
?anchor:h_anchor ->
?v_anchor:v_anchor ->
Layout.t ->
Grid.t ->
x:float ->
y:float ->
string ->
unittext layout grid ~x ~y label draws a text label at (x, y). style inherits from Theme.t.labels. anchor defaults to `Left.
The type for arrow head styles.
`None: no head.`Arrow: directional arrow.`Dot: circular dot.val arrow :
?style:Ansi.Style.t ->
?head:arrow_head ->
Layout.t ->
Grid.t ->
x1:float ->
y1:float ->
x2:float ->
y2:float ->
unitarrow layout grid ~x1 ~y1 ~x2 ~y2 draws a line from (x1, y1) to (x2, y2) with an optional head at the endpoint. style inherits from Theme.t.labels. head defaults to `Arrow.