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

consistent text mode #4247

Closed
nicolaskruchten opened this issue Oct 2, 2019 · 8 comments · Fixed by #4420
Closed

consistent text mode #4247

nicolaskruchten opened this issue Oct 2, 2019 · 8 comments · Fixed by #4420
Assignees
Labels
feature something new
Milestone

Comments

@nicolaskruchten
Copy link
Contributor

nicolaskruchten commented Oct 2, 2019

We need a simple way to guarantee that the text displayed within/across traces of the same type is in the same size and orientation. For example if I have two bar traces in a plot with text visible, the text should all be of the same size and either all vertical or all horizontal. Likely this will mean making it all as small as necessary to fit the largest bit of text.

We likely want this to work within treemaps as well: being able to guarantee that short labels aren't being displayed bigger than long labels.

For pies and sunbursts obviously orientation is a bit trickier because it's relative to the sector but for size the logic should be the same. I would expect that below a certain size the text could all be horizontal and above a certain size the text would all just be oriented radially or something.

I don't think we need this to work across trace types (although it should work across traces), e.g. same font size for bars and treemaps in the same figure (but different bar traces should coordinate).

We should probably provide a min/max font size along with some kind of defined fallback if the required size to make it fit is outside of those bounds.

@nicolaskruchten nicolaskruchten added the feature something new label Oct 2, 2019
@etpinard
Copy link
Contributor

etpinard commented Oct 2, 2019

For pies and sunbursts obviously orientation is a bit trickier

Related: #3590

@nicolaskruchten nicolaskruchten added this to the v1.52.0 milestone Oct 31, 2019
@archmoj archmoj self-assigned this Nov 19, 2019
@archmoj
Copy link
Contributor

archmoj commented Nov 29, 2019

Any idea for attribute names?

@nicolaskruchten
Copy link
Contributor Author

maybe layout.tracetext = {min, max, mode}
where mode can be clamp or hide ?
maxmode and minmode?
so if the text is smaller than min and the minmode is clamp then you set the size to min and overflow
otherwise you hide?

@archmoj
Copy link
Contributor

archmoj commented Dec 2, 2019

I am thinking of adding a module called crossTracePlot.

@archmoj
Copy link
Contributor

archmoj commented Dec 2, 2019

How this should operate between subplots?

@nicolaskruchten
Copy link
Contributor Author

nicolaskruchten commented Dec 2, 2019 via email

@archmoj
Copy link
Contributor

archmoj commented Dec 2, 2019

So with traces in two different subplots should they use an identical minimum or two minimum values?

@nicolaskruchten
Copy link
Contributor Author

identical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
3 participants