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

Axis title could also change the labels in the hovering popup #2618

Closed
adube opened this issue May 7, 2018 · 9 comments
Closed

Axis title could also change the labels in the hovering popup #2618

adube opened this issue May 7, 2018 · 9 comments
Labels
feature something new

Comments

@adube
Copy link

adube commented May 7, 2018

This is an enhancement suggestion.

When setting the title of an axis, such as:

        xaxis: {
            type: 'linear',
            zeroline: false,
            title: "hellox"  // <----
        },

it would make sense to have the same title as default value in the popup being shown on mouse hovering. Currently, the default value stays "x", where it could have been "hellox" instead.

See an example here: https://codepen.io/anon/pen/qoGQvx

See also the riginal question asked on Stack Overflow

Please, let me know if that makes sense.

@alexcjohnson
Copy link
Collaborator

Thanks @adube - yes, makes a lot of sense. I don't think we can always do this, there are times when the title is too long, or displayed on one subplot and not others, etc... so it would probably have to be opt-in unless we can come up with a sufficiently robust criterion for automatically using the title.

@alexcjohnson alexcjohnson added the feature something new label May 7, 2018
@adube
Copy link
Author

adube commented May 7, 2018

@alexcjohnson Thanks for your comment.

I agree. As a way to not always enable this behaviour, we could have some sort of "flag" option (boolean) which would be false by default to not break the current behaviour. When setting it to true, users could expect limitations such as title being too long and the other things you mentioned.

I'm not familiar enough with the code to be able to determine a more robust solution at this point, but I think the above suggestion could do the trick.

@nicolaskruchten
Copy link
Contributor

I think this makes a ton of sense in general and especially in 3d and ternary contexts: 3d because after a few rotations or whatever, it's no longer visually clear what x, y, and z mean, and ternary because there's no reasonable way a user could know what A, B and C map to ;)

@etpinard
Copy link
Contributor

etpinard commented May 7, 2018

Somewhat a duplicate of #265

@adube
Copy link
Author

adube commented May 7, 2018

Indeed, it is.

@vvch
Copy link

vvch commented Oct 27, 2018

I agree. As a way to not always enable this behaviour, we could have some sort of "flag" option (boolean) which would be false by default to not break the current behaviour. When setting it to true, users could expect limitations such as title being too long

This option (e.g., 'hovertitle') may also contain text (for each axis) as alternative short hover-only title for this axis. That is, default 'false' value means current behaviour, 'true' means use axis label (maybe with some automatic abbreviation), and text value means use this value.
Would be great if the text may also contain HTML and TeX markup, even in 3D plots (seems like it may be simpler to implement than #608 )

@vvch
Copy link

vvch commented Oct 27, 2018

Seems like similar feature was already implemented (but not pulled yet): #3126 #3007

@nicolaskruchten
Copy link
Contributor

@antoinerg this would be a nice addition :)

@gvwilson
Copy link
Contributor

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

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