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

More layout meta support #3548

Merged
merged 4 commits into from
Feb 15, 2019
Merged

More layout meta support #3548

merged 4 commits into from
Feb 15, 2019

Conversation

etpinard
Copy link
Contributor

resolves #3541 by adding layout.meta support for:

  • trace.name, both in legend items and hover labels
  • rangeselector buttons label
  • updatemenus buttons label
  • sliders steps label

@VeraZab I also added TEMPLATE_STRING_REGEX to Lib as requested.

cc @plotly/plotly_js

@etpinard etpinard added this to the v1.45.0 milestone Feb 15, 2019
@antoinerg
Copy link
Contributor

Original Codepen now fixed with plotly.js from this branch: https://codepen.io/antoinerg/pen/gqQbGK

@antoinerg
Copy link
Contributor

antoinerg commented Feb 15, 2019

Thanks @etpinard for the fix!

However, I'm wondering if the metadata in layout.meta is accessible from hovertemplate?

@etpinard
Copy link
Contributor Author

However, I'm wondering if the metadata in layout.meta is accessible from hovertemplate?

Not yet.

@antoinerg
Copy link
Contributor

This is non-blocking, but I think it would be as simple as adding a 4th argument {meta: meta} when calling Lib.hovertemplateString on this line:

text = Lib.hovertemplateString(hovertemplate, hovertemplateLabels, eventData);
. If you do add it, an additional test would be needed.

If you prefer not to add hovertemplate support in this PR, this is ready to 💃

@etpinard
Copy link
Contributor Author

as adding a 4th argument {meta: meta} when calling Lib.hovertemplateString on this line

If it's that easy, then might as well -> a0ff6a1

@antoinerg
Copy link
Contributor

If it's that easy, then might as well -> a0ff6a1

Glad that it really was that easy and thanks for improving hovertemplate again 🏅

💃 once the tests pass on CircleCI!

@etpinard etpinard merged commit 4eaad9b into master Feb 15, 2019
@etpinard etpinard deleted the more-meta branch February 15, 2019 20:52
@etpinard etpinard mentioned this pull request May 14, 2019
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 this pull request may close these issues.

[Feature] add trace name to be referenced from 'metasrc'
2 participants