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 for a line have higher priority than points, even if the point is specified first in the layer list #1060

Open
INekrasova-HORIS opened this issue Mar 22, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@INekrasova-HORIS
Copy link

INekrasova-HORIS commented Mar 22, 2024

Tooltip for a line have higher priority than points, even if the point is specified first in the layer list

image

import numpy as np
import pandas as pd
from lets_plot import *
LetsPlot.setup_html()
n = 100
classes = ['a', 'b', 'c']
np.random.seed(42)
x = np.random.normal(size=n)
y = np.random.normal(size=n)
c = np.random.choice(classes, size=n)
df = pd.DataFrame({'x': x, 'y': y, 'c': c})
bounds_df = pd.DataFrame([(cl, df[df.c == cl].y.max()) for cl in classes], \
                         columns=['c', 'ymax'])
ggplot() + \
        geom_point(aes(x='x', y='y', color='c'), data=df, tooltips=layer_tooltips().line("@x")) + \
        geom_hline(aes(yintercept='ymax', color='c'), data=bounds_df, size=.7, linetype='longdash') 
@alshan alshan added this to the New milestone Mar 22, 2024
@alshan alshan added the bug Something isn't working label Apr 1, 2024
@alshan alshan modified the milestones: New, 2024Q2 Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants