Skip to content

Expose more Plot internals to facilitate building new mark types. #170

Closed
@mbostock

Description

@mbostock

In an upcoming Plot release, we should document how to implement custom mark types and expose the necessary internals to make this easier. Ideally, all of Plot’s built-in mark types are “unprivileged” in the sense that they rely exclusively on stuff that’s available publicly. That way we can feel good about the barrier to custom mark types being low.

I’m thinking we expose options.js mostly as-is, but perhaps adopt a naming convention that delineates these implementation helpers from Plot’s more commonly-needed plotting API. For example, maybe it’s renderDirectStyles, renderIndirectStyles, renderTransform, renderChannelStyles, renderOffset instead of applyDirectStyles, applyIndirectStyles, applyTransform, applyChannelStyles, offset. Or at least we do a pass on naming before exposing publicly, and have a separate section in the README (or even a different README) for custom marks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions