Skip to content

render API #501

Closed
Closed
@Fil

Description

@Fil

#498 has introduced function marks: () => svg node

That render function is called like any other and receives as input (data, scales, channels, dimensions), with empty data and channels, all the instantiated scales, and complete dimensions.

It would be useful I think to design and document this API (for all marks). The changes I'd suggest would be:

  1. pass the facet's "content" (i.e. "Chinstrap")
  2. order the API as (dimensions, scales, facet, data, channels)
  3. change the dimensions in such a way that we can ignore margins (ie width would be the current width-marginLeft-marginRight, and the would already be translated by marginLeft, marginTop)

https://observablehq.com/d/cfdce446a293784f

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to docsquestionFurther information is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions