Restored hover functionality for plots with multidimensional data

This commit is contained in:
Steve Leung 2022-03-28 19:51:56 -07:00
parent 0f4a0c7154
commit af08edb992
No known key found for this signature in database
GPG Key ID: 192CA5C92E7EA34E

View File

@ -1020,13 +1020,15 @@ function plotly_polar!(plotattributes_out::KW, series::Series)
end
function plotly_hover!(plotattributes_out::KW, hover)
# hover text
if hover === nothing || all(in([:none, false]), hover)
if isnothing(hover)
return nothing
elseif all(in([:none, false]), hover)
plotattributes_out[:hoverinfo] = "none"
elseif any(!isnothing, hover)
plotattributes_out[:hoverinfo] = "text"
plotattributes_out[:text] = hover
end
return nothing
end
# get a list of dictionaries, each representing the series params