You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support simple subtitle parameter (like title) #6856
I think it should go inside layout.title object instead of layout. It reminds of when we added minor ticks in #6166.
That would also allow adding multiple titles and subtitles later on.
I think that’s right. Also makes it clear that it inherits positioning from the title (presumably with optional overrides to at least the spacing relative to the main title) and it can inherit the main title font (but smaller, and remove bold if you bolder the main font?)
One may wants to add an attribute e.g. spacing (in pixel?) to help increase the space between the title and subtitle.
But I am not sure where it should go in the API i.e. title.spacing or title.subtitle.spacing?
Activity
TonyBurbs commentedon May 14, 2024
Here is a link to figma for the lowest touch effort:
https://www.figma.com/design/tp9E4awumSOuCG1ZNev09z/Plotly.js-Design-System?node-id=21676%3A325474&t=aE2dNlExZS4pbsNs-1
It's adding in the subtitle and citation without any other major design changes
emilykl commentedon May 16, 2024
API for subtitle
titlesubtitleproperty directly underlayoutwith the same properties astitleStructure:
layoutsubtitletext: strfont: standard font options@archmoj API-wise this seems pretty straightforward -- do you have any thoughts or suggestions?
archmoj commentedon May 16, 2024
I think it should go inside
layout.titleobject instead oflayout.It reminds of when we added
minorticks in #6166.That would also allow adding multiple titles and subtitles later on.
archmoj commentedon May 16, 2024
Also it would be nice (and possibly easy) to have the subtitle option available on the cartesian axes and other places too.
archmoj commentedon May 16, 2024
For a quick prototype, perhaps you could add the subtitle text to the end of title.text with a
<br>and style it differently.alexcjohnson commentedon May 17, 2024
I think that’s right. Also makes it clear that it inherits positioning from the title (presumably with optional overrides to at least the spacing relative to the main title) and it can inherit the main title font (but smaller, and remove bold if you bolder the main font?)
emilykl commentedon May 17, 2024
@archmoj @alexcjohnson Makes sense -- do you mean something like the below?
layouttitlesubtitletextfontarchmoj commentedon May 17, 2024
Yes. Let's start with just that. Perhaps we rename
subtitletosublater.emilykl commentedon May 23, 2024
As suggested by @archmoj : A simple working prototype which uses HTML tags to simulate a subtitle:
https://codepen.io/emilykl-code/pen/MWdKYmr
archmoj commentedon May 24, 2024
One may wants to add an attribute e.g.
spacing(in pixel?) to help increase the space between the title and subtitle.But I am not sure where it should go in the API i.e.
title.spacingortitle.subtitle.spacing?