-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finalize the design of the render API #1263
Labels
documentation
Improvements or additions to docs
enhancement
New feature or request
question
Further information is needed
Comments
Closed
1 task
This should also be done in the initializer, see #8 for a use case. |
(Clarified the issue title to make clear that we already have a render API, but that the design isn’t finalized and has the described quirks and outstanding questions.) |
This was referenced Aug 15, 2023
Closing as we have done most of the work here, though there may be follow-up feature enhancements. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
documentation
Improvements or additions to docs
enhancement
New feature or request
question
Further information is needed
The render API still has a few quirks that we might want to address:
Scales
The scales argument is an object of D3 scale functions. This is inconsistent with how we expose the scales elsewhere. Currently internal marks need the scales for a few operations:
If we passed the same objects that plot.scale("x") returns (i.e. scale descriptors), we need to pass the "ticks" function, or to recreate it from the descriptor.
Facets
The index passed to render is decorated with the facet information : the values of fx and fy for the current facet, as well as a facet index fi. (fi is used internally for the raster mark.) This needs to be documented. Example here.
svg, parent element
Passing the svg, and the parent element, could help to build marks that need to use these (for instance, to add defs to the svg). They could be referenced in the context argument. For example, #1304 experiments with passing the svg in the context. (This was done in 0.6.7.)
Event listeners
A mark wants to listen to events (pointermove…), and send events (setting a value and sending a CustomEvent(input)). Needs an "official" api support rather than the mark fishing for the figure element. (Done in 0.6.7.)
Update
Farther in the future, we might want to have a strategy to update a “layer”; this could happen by passing the previously returned node.
Documentation
Once this is is decided and done (one way or another), a documentation notebook with examples will help advanced users who want to extend Plot.
(for an earlier version of this issue, see #501)
The text was updated successfully, but these errors were encountered: