Skip to content

Commit 7053651

Browse files
committed
add clip, remove duplicate pointer
1 parent c11ea37 commit 7053651

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

docs/features/marks.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ A convenience method for composing a mark from a series of other marks. Returns
593593

594594
## Rendering
595595

596-
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.
596+
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.
597597

598598
:::warning
599599
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:
676676
* document - the [document object](https://developer.mozilla.org/en-US/docs/Web/API/Document)
677677
* ownerSVGElement - the chart’s bare svg element
678678
* className - the [class name](./plots.md#other-options) of the chart (*e.g.*, "plot-d6a7b5")
679+
* clip - the top-level [clip](./features/plots.md#other-options) option (to use when the mark’s clip option is undefined)
679680
* projection - the [projection](./projections.md) stream, if any
680681
* dispatchValue - a function that sets the chart’s value and dispatches an input event if the value has changed; useful for interactive marks
681682
* getMarkState - a function that returns a mark’s state
@@ -727,7 +728,3 @@ Plot.dot(penguins, {
727728
}
728729
}).plot()
729730
```
730-
731-
:::info
732-
A similar technique is used by Plot’s [pointer](../interactions/pointer.md) transform to render the point closest to the pointer.
733-
:::

0 commit comments

Comments
 (0)