Skip to content
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

Add caption option. #320

Merged
merged 2 commits into from
Apr 10, 2021
Merged

Add caption option. #320

merged 2 commits into from
Apr 10, 2021

Conversation

mbostock
Copy link
Member

If a caption option is specified, the plot is wrapped in a figure with a corresponding figcaption. The caption may be specified either as HTML (i.e., an element, fragment, or text node) or as a string which is converted into a text node. Related #92.

Of course you could always do this yourself, but I think it’s nice to have this built-in as it encourages people to add descriptive captions to plots, as well as a consistent style for these captions.

@mbostock mbostock requested a review from Fil April 10, 2021 15:25
Copy link
Contributor

@Fil Fil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useful. And I like how it's not trying to do everything but gives a hint of what plugins could do.

@mbostock mbostock merged commit 0692c6d into main Apr 10, 2021
@mbostock mbostock deleted the mbostock/caption branch April 10, 2021 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants