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

Support title/subtitle/caption in vgplot #296

Open
frtennis1 opened this issue Feb 18, 2024 · 4 comments · May be fixed by #297
Open

Support title/subtitle/caption in vgplot #296

frtennis1 opened this issue Feb 18, 2024 · 4 comments · May be fixed by #297

Comments

@frtennis1
Copy link
Contributor

Observable Plot has the ability to specify a title, subtitle, and/or caption on a plot https://observablehq.com/plot/features/plots#other-options.

It would be nice to pass through these options in vgplot so Mosaic can use them as well.

@frtennis1 frtennis1 linked a pull request Feb 18, 2024 that will close this issue
@frtennis1
Copy link
Contributor Author

@jheer hiya! If you get a sec, could I get your thoughts on the pull request? It's a pretty small (and hopefully uncontroversial) change.

@jheer
Copy link
Member

jheer commented Mar 15, 2024

Thanks for your patience (and for the PR!). I still need to think through this a bit more, as I'm not yet 100% sure we want to expose this. For example, we might instead consider adding title, caption, etc to the spec language as new components which could work in any Mosaic spec (and not just Plot) in a consistent way.

And if we do choose to expose these I need to do some testing to make sure that any HTML wrappers that Plot adds to titled/captioned plots don't interfere with our assumptions when adding interactors to the generated content.

@frtennis1
Copy link
Contributor Author

frtennis1 commented Mar 18, 2024

Aha, gotcha. Does seem more involved than I initially thought. Let me know if I can help with any of those steps! (e.g. if you become convinced adding title/caption/spec as new components rather than top-level attributes is the way to go, I can look into changing the PR to do it that way whenever I get a moment if you'd like)

@domoritz
Copy link
Member

If we want to try that route, I'd recommend a new pull request so we can compare the results better.

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 a pull request may close this issue.

3 participants