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

Gap for tick labels #883

Closed
CalvinFernandez opened this issue Aug 25, 2016 · 5 comments
Closed

Gap for tick labels #883

CalvinFernandez opened this issue Aug 25, 2016 · 5 comments
Labels
feature something new

Comments

@CalvinFernandez
Copy link

image

I would love a little more space between my ylabel and line -- wish there was a way to specify the padding between the label and the line, perhaps something like gap

@etpinard
Copy link
Contributor

etpinard commented Sep 1, 2016

There's a hacky to do this right now using invisible ticks: http://codepen.io/etpinard/pen/BLaWKz

But yeah, we should really add some padding attribute(s) for ticks (I'd vote for tickpad - similar to borderpad used in annotations). Positive tickpad values would corresponds to away from the axis.

Alternatively, we could add two attributes one for horizontal and one for vertical tick label padding. I would personally vote 👎 about this as horizontal / vertical direction has a different meaning for x and y axes making the API potentially confusing.

Perhaps tick label alignment along the axis line (i.e. vertically for y-axes) could be configured using some anchor-type attribute. For example, yaxis.tickanchor: 'bottom' would place the y tick labels above their corresponding ticks.

Thoughts?

@etpinard etpinard added the feature something new label Sep 1, 2016
@cldougl
Copy link
Member

cldougl commented Sep 2, 2016

Positive tickpad values would corresponds to away from the axis.

This sounds like it would be a super useful option!

@thierryVergult
Copy link
Contributor

I could add some space between the horizontal bar and the label of the category via some css, but also was trying to have left alignment, without success so far.

.ytick { 
   transform: translate(-10px,0px);
}

@alexcjohnson
Copy link
Collaborator

One way to achieve left alignment would be anchor: 'free', side: 'right' and then move the labels off the edge of the plot area with something like position: -0.1 or shrinking the domain of the x axis to something like [0.1, 1]. There wouldn't be any automatic sizing this way, you'd need to manually choose the offset that leaves the right amount of space for the labels.

@gvwilson
Copy link
Contributor

gvwilson commented Jun 5, 2024

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

@gvwilson gvwilson closed this as completed Jun 5, 2024
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

No branches or pull requests

6 participants