From 7053651fd193ac1a2598604280e4ad633436ca7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Mon, 30 Sep 2024 10:50:42 +0200 Subject: [PATCH] add clip, remove duplicate pointer --- docs/features/marks.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/features/marks.md b/docs/features/marks.md index d930828ba7..ee9385426a 100644 --- a/docs/features/marks.md +++ b/docs/features/marks.md @@ -593,7 +593,7 @@ A convenience method for composing a mark from a series of other marks. Returns ## Rendering -To draw the visual representation of a mark, Plot calls its render function and inserts the returned SVG element (if any) in the chart. This function is called for each non-empty facet. It may also be called repeatedly by interactions, for example when the [pointer](./pointer) transform needs to draw the highlighted data point after a mouse move. +To draw the visual representation of a mark, Plot calls its render function and inserts the returned SVG element (if any) in the chart. This function is called for each non-empty facet. It may also be called repeatedly by interactions, for example when the [pointer](./pointer.md) transform needs to draw the highlighted data point after a mouse move. :::warning This is a low-level interface. We recommend using higher-level options, such as [data transforms](https://observablehq.com/plot/features/transforms), when possible. @@ -676,6 +676,7 @@ The *context* contains several useful globals: * document - the [document object](https://developer.mozilla.org/en-US/docs/Web/API/Document) * ownerSVGElement - the chart’s bare svg element * className - the [class name](./plots.md#other-options) of the chart (*e.g.*, "plot-d6a7b5") +* clip - the top-level [clip](./features/plots.md#other-options) option (to use when the mark’s clip option is undefined) * projection - the [projection](./projections.md) stream, if any * dispatchValue - a function that sets the chart’s value and dispatches an input event if the value has changed; useful for interactive marks * getMarkState - a function that returns a mark’s state @@ -727,7 +728,3 @@ Plot.dot(penguins, { } }).plot() ``` - -:::info -A similar technique is used by Plot’s [pointer](../interactions/pointer.md) transform to render the point closest to the pointer. -:::