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

Allow to choose whether to trim trace names in hover info #1777

Closed
simoneb opened this issue Jun 12, 2017 · 4 comments · Fixed by #1822
Closed

Allow to choose whether to trim trace names in hover info #1777

simoneb opened this issue Jun 12, 2017 · 4 comments · Fixed by #1822
Labels
feature something new

Comments

@simoneb
Copy link

simoneb commented Jun 12, 2017

Because of https://github.com/plotly/plotly.js/blob/master/src/components/fx/hover.js#L703 trace names longer than 15 chars get trimmed. It would be useful to provide an option to decide whether to trim or not

@etpinard
Copy link
Contributor

Yeah for sure. Thanks for writing in!

@etpinard etpinard added the feature something new label Jun 12, 2017
@simoneb
Copy link
Author

simoneb commented Jun 12, 2017

@etpinard thanks for the feedback.

To expand on this, it would also be useful to be able to specify the maximum number of chars to trim to, or not at all. If you can give me some hints about where you think this configuration should live and what shape it may have based on your coding standards I can also create a PR. My first guess would be an additional option next to hoverinfo in a trace configuration, but maybe there's a better, upstream location for such a configuration?

@alexcjohnson
Copy link
Collaborator

@simoneb definitely, making this attribute an integer seems like the way to go. I'd put it in hoverlabel, perhaps hoverlabel.trimname or hoverlabel.namelength? Then a value of 0 would mean "no trimming" (or perhaps false would be clearer? It's not an integer but we do mix types for purposes like that elsewhere) and the dflt would be 15.

@etpinard
Copy link
Contributor

+1 for hoverlabel.namelength

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

Successfully merging a pull request may close this issue.

3 participants