Merge pull request #2378 from daschw/plotly-hover

show datapoints on hover by default for plotly
This commit is contained in:
Daniel Schwabeneder 2020-02-05 14:22:40 +01:00 committed by GitHub
commit b5f54afed2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -780,9 +780,9 @@ end
function plotly_hover!(plotattributes_out::KW, hover)
# hover text
if hover in (:none, false)
if all(in([:none, false]), hover)
plotattributes_out[:hoverinfo] = "none"
elseif hover !== nothing
elseif any(!isnothing, hover)
plotattributes_out[:hoverinfo] = "text"
plotattributes_out[:text] = hover
end