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

"None" value of hovertext is shown as String #1244

Closed
pmercatoris opened this issue Oct 25, 2018 · 2 comments
Closed

"None" value of hovertext is shown as String #1244

pmercatoris opened this issue Oct 25, 2018 · 2 comments
Labels
bug something broken
Milestone

Comments

@pmercatoris
Copy link

In plotly 2.5.1, a None value of hovertext would result in the hoverinfo being skipped.
However, in 3.3.0, that is not the case. Instead, it will show the None as a string.

import plotly.graph_objs as go

test = go.Scatter(
    x=[0,1],
    y=[0,1],
    hovertext=[None, 'test'],
    mode='lines',
    hoverinfo='x+text',
)

In 2.5.1, test is:

{'hoverinfo': 'x+text',
 'hovertext': [None, 'test'],
 'mode': 'lines',
 'type': 'scatter',
 'x': [0, 1],
 'y': [0, 1]}

In 3.3.0, test is:

Scatter({
    'hoverinfo': 'x+text', 'hovertext': ['None', 'test'], 'mode': 'lines', 'x': [0, 1], 'y': [0, 1]
})

Resulting in this:

screenshot_2018-10-25_12-53-18

@jonmmease jonmmease added the bug something broken label Oct 30, 2018
@jonmmease
Copy link
Contributor

Thanks for the report @pmercatoris, I see what you mean. It looks like we're inadvertently converting None values to strings during validation.

@jonmmease
Copy link
Contributor

Done in #1249 and will be released in version 3.4.0. Thanks for taking the time to let us know!

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

No branches or pull requests

2 participants