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

Tooltip is not shown when configured for 'const' value. #610

Closed
alshan opened this issue Oct 6, 2022 · 0 comments
Closed

Tooltip is not shown when configured for 'const' value. #610

alshan opened this issue Oct 6, 2022 · 0 comments
Assignees
Milestone

Comments

@alshan
Copy link
Collaborator

alshan commented Oct 6, 2022

See cell 15 : https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/examples/cookbook/tooltip_config.ipynb

# By default tooltip never shows values defined via layer parameters (constants).
# Still, these values can be added to a layer tooltip using the 'layer_tooltips()' function.
data= {}
data['x'] = np.append(np.random.normal(0,1,100), np.random.normal(3,1,100))
data['y'] = np.append(np.random.normal(0,1,100), np.random.normal(3,1,100))

(ggplot(data, aes('x', 'y')) 
  + geom_point()
  + geom_vline(xintercept=np.mean(data['x']), color="red", linetype="dashed", size=1,
               tooltips=layer_tooltips()
                   .format('^xintercept', '.4f')
                   .line('mean = ^xintercept'))
) 

The vline still doesn't have a tooltip.

image

@alshan alshan added this to the 2023Q1 milestone Dec 28, 2022
@OLarionova-HORIS OLarionova-HORIS self-assigned this Mar 16, 2023
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