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

New attributes to display text on the histogram trace #6038

Merged
merged 2 commits into from
Dec 1, 2021
Merged

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Nov 23, 2021

Resolves #4645.

@plotly/plotly_js

@archmoj archmoj added this to the v2.7.0 milestone Nov 23, 2021
@@ -428,7 +428,7 @@ function appendBarText(gd, plotinfo, bar, cd, i, x0, x1, y0, y1, opts, makeOnCom
}

transform.fontSize = font.size;
recordMinTextSize(trace.type, transform, fullLayout);
recordMinTextSize(trace.type === 'histogram' ? 'bar' : trace.type, transform, fullLayout);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you explain how this relates to the clearMinTextSize call above, where it's just 'bar', not trace.type at all?

// don't clear bar when this is called from waterfall or funnel
clearMinTextSize('bar', fullLayout);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Histogram plots in bar layer. But waterfall and funnel have their own layers.

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃 Excellent!

@archmoj archmoj merged commit f5c6f47 into master Dec 1, 2021
@archmoj archmoj deleted the histogram-text branch December 1, 2021 19:08
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
Development

Successfully merging this pull request may close these issues.

texttemplate for histogram traces
2 participants