Skip to content

Commit

Permalink
add clip, remove duplicate pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil committed Sep 30, 2024
1 parent c11ea37 commit 7053651
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions docs/features/marks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
:::

0 comments on commit 7053651

Please sign in to comment.