add legendtitle to plotly

This commit is contained in:
Daniel Schwabeneder 2020-10-07 01:12:50 +02:00
parent ade0a2dfdc
commit 4b0fb86753

View File

@ -339,7 +339,11 @@ function plotly_add_legend!(plotattributes_out::KW, sp::Subplot)
:font => plotly_font(legendfont(sp)),
:tracegroupgap => 0,
:x => legend_position.coords[1],
:y => legend_position.coords[2]
:y => legend_position.coords[2],
:title => KW(
:text => sp[:legendtitle] === nothing ? "" : string(sp[:legendtitle]),
:font => plotly_font(legendtitlefont(sp)),
),
)
end
end