Skip to content

Hovertemplate #3643

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

Closed
alien3d opened this issue Mar 18, 2019 · 2 comments
Closed

Hovertemplate #3643

alien3d opened this issue Mar 18, 2019 · 2 comments

Comments

@alien3d
Copy link

alien3d commented Mar 18, 2019

Code Pen :https://codepen.io/coderpasar/pen/qvKPmX

  1. Overlap hover template even put force put z-index;
  2. If the box is small the force alignment using "& n b s p ;" also didn't work.
    Have try to put div and span and table seem nothing work
  3. Try to remove the margin and also increase z-index don't work.The hover text or hovertemplate are the max z-index available.

Question

  1. Is there something like callback renderer chart.renderHoverTemplate(function(){ return; }); which we can send html tag and re-render it..
@etpinard
Copy link
Contributor

Hi, here's some information that might help you understand what you're seeing:

Overlap hover template even put force put z-index;

That's correct, that won't work as our hover labels are generated in SVG, which doesn't adhere to z-index.

  • If the box is small the force alignment using "& n b s p ;" also didn't work.
    Have try to put div and span and table seem nothing work

That won't do it either, we support only a limited set of HTML tags and entities:

var TAG_STYLES = {
// would like to use baseline-shift for sub/sup but FF doesn't support it
// so we need to use dy along with the uber hacky shift-back-to
// baseline below
sup: 'font-size:70%',
sub: 'font-size:70%',
b: 'font-weight:bold',
i: 'font-style:italic',
a: 'cursor:pointer',
span: '',
em: 'font-style:italic;font-weight:bold'
};

  1. Is there something like callback renderer chart.renderHoverTemplate(function(){ return; }); which we can send html tag and re-render it..

No, we aren't planning on adding any time soon unfortunately. The plotly.js API is meant to be JSON-serializable.


That said, we are planning on adding a few more attributes to make our hover labels more customizable.

I'd recommend subscribing to:

for the most up-to-date development info.

@etpinard
Copy link
Contributor

Closing due to lack of activity.

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

No branches or pull requests

2 participants