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

Provide minimal padding for inside tick labels case of bar, heatmap, line plots #5325

Merged
merged 7 commits into from Dec 7, 2020

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Dec 7, 2020

Fixes #5322 and fixes #5321 (padding for line plots & unnecessary padding).

Demo1: bar
Before vs After

Demo2: line plot
Before vs After

Demo3: heatmap
Before vs After

TODO:

  • add test

@plotly/plotly_js

@alexcjohnson
Copy link
Collaborator

@archmoj this looks great for including padding in the cases it was previously ignored. Do you want to sort out why the line case is getting such huge padding in the y direction in this PR, or do that in a separate PR?

@archmoj
Copy link
Contributor Author

archmoj commented Dec 7, 2020

@archmoj this looks great for including padding in the cases it was previously ignored. Do you want to sort out why the line case is getting such huge padding in the y direction in this PR, or do that in a separate PR?

I'll try to address it in this PR.

@nicolaskruchten
Copy link
Member

the heatmap case is a bit of an edge-case but this seems correct to me. I'm not sure what the point would be of putting the labels on the inside for a heatmap but if that's what they're asking for that's what they should get, I think.

An eventual <trace>.padding prop could be used to override this, if they wanted inside ticks on top of the heatmap, presumably, correct?

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.

Looks great! 💃

@archmoj archmoj merged commit 4e00196 into master Dec 7, 2020
@archmoj archmoj deleted the pad-for-insideticklabels branch December 7, 2020 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ticklabelposition inside with bars strange ticklabelposition behaviour
3 participants