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

How can we convert this plotly graph into highcharts and also get the hover data? #15

Open
muhammad-faizan-122 opened this issue Sep 27, 2022 · 0 comments

Comments

@muhammad-faizan-122
Copy link

import plotly.graph_objects as go
import numpy as np
import plotly.express as px

df = px.data.gapminder().query("country=='Canada'")
fig = go.Figure()
fig.add_trace(
go.Scatter(
x=df["year"],
y=df["pop"],
name="line1",
hoverinfo="text+name",
line_shape="spline",
mode="markers+lines",
line=dict(
color="Blue",
width=4,
),
)
)
fig.add_trace(
go.Scatter(
x=df["year"],
y=df["lifeExp"],
name="line2",
hoverinfo="text+name",
line_shape="vh",
mode="markers",
line=dict(color="red", width=5),
)
)

fig.show()

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

1 participant