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

Place labels inside chart #877

Closed
CalvinFernandez opened this issue Aug 23, 2016 · 11 comments
Closed

Place labels inside chart #877

CalvinFernandez opened this issue Aug 23, 2016 · 11 comments
Labels
community community contribution feature something new

Comments

@CalvinFernandez
Copy link

image

Is it possible to place labels inside chart the way they appear on the Y axis above? It seems like axis labels could support an 'inside' and 'outside' designation the same way they're implemented with ticks.

@etpinard
Copy link
Contributor

That's not possible at the moment unfortunately.

@CalvinFernandez I can turn this issue into a feature request if you like.

@CalvinFernandez
Copy link
Author

@etpinard is this the correct place for feature requests? I wasn't sure -- If you would like I can submit a PR for this

@etpinard
Copy link
Contributor

is this the correct place for feature requests?

Yes. Absolutely.

If you would like I can submit a PR for this

that would be amazing.

@etpinard etpinard added feature something new community community contribution labels Aug 24, 2016
@etpinard
Copy link
Contributor

deleting all +1s.

@plotly plotly deleted a comment from doersino Mar 12, 2018
@plotly plotly deleted a comment from shannonlubetichsc Mar 12, 2018
@plotly plotly deleted a comment from jayfresh Mar 12, 2018
@plotly plotly deleted a comment from edwardbetan Mar 12, 2018
@plotly plotly deleted a comment from nkmechanics Mar 12, 2018
@plotly plotly deleted a comment from romallemann Mar 12, 2018
@ricazhang
Copy link

@etpinard

First, hi, I'm new to contributing so I wanted to run this idea by you if that's ok. I've created a basic implementation for this locally by adding a field in yaxis called ticklabelalignment which can be set to "inside" or "outside". If it is "inside" then you need to make some changes in axes.js (see image below).

This is similar to what you suggested in #883 for the tickanchor. It would not cover positioning the label above or below the tick though (#1882), its only for the horizontal alignment but we could do something similar for the vertical alignment. This seems to work well with left or right y-axis and subplots.

screen shot 2018-06-12 at 9 57 21 pm

@rms95
Copy link

rms95 commented Aug 18, 2018

As I understand these changes aren't in the current version? (I'm working with 1.40, using yaxis: { ticklabelalignment: 'inside' })

As this is a much needed change for mobile (maximizing screen real estate utilization), I'd very much like to see this feature. Many apps use this:
https://www.designyourway.net/diverse/6/uicharts/1997994.jpg
https://cdn.dribbble.com/users/4620/screenshots/2576470/linegraphdashmobile_1x.png
Or Google Image search for "mobile graph"

@etpinard There seems to be a solution (or at least partially, for horizontal alignment, which is the most important one in most use cases), which from the looks of it does not pose a high risk for conflicts, can this please be verified and merged to the master branch?

@ricazhang
Copy link

@rms95 Yes they aren’t in the current version. I haven’t merged my change to master. You’re welcome to try out my version of it with that alignment flag though!

@rms95
Copy link

rms95 commented Aug 18, 2018

I looked at the /dist/plotly.min.js file in your latest commit files, though that doesn't seem to include the new code.
I haven't compiled projects like this before, if you have the fully build file ready to grab, would mind sending it as attachment here?

@nirmal495
Copy link

Any update on this feature?? It would be great to have label alignment on the y axis

@alexcjohnson
Copy link
Collaborator

Closed by #5275

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

No branches or pull requests

7 participants
@CalvinFernandez @alexcjohnson @rms95 @nirmal495 @etpinard @ricazhang and others