X Tutup
The Wayback Machine - https://web.archive.org/web/20220520000300/https://github.com/plotly/plotly.js/pull/5325
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
Contributor

@alexcjohnson alexcjohnson 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?

@archmoj
Copy link
Contributor Author

@archmoj 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

@nicolaskruchten nicolaskruchten commented Dec 7, 2020

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?

@archmoj archmoj force-pushed the pad-for-insideticklabels branch from 0581849 to cf68ae7 Compare Dec 7, 2020
Copy link
Contributor

@alexcjohnson alexcjohnson left a comment

Looks great! 💃

@archmoj archmoj merged commit 4e00196 into master Dec 7, 2020
8 of 9 checks passed
@archmoj archmoj deleted the pad-for-insideticklabels branch Dec 7, 2020
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.

3 participants
X Tutup