From 6286c67c014d614666a3a301bf296aa1c7817862 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Wed, 7 Oct 2020 01:12:50 +0200 Subject: [PATCH] add legendtitle to plotly --- src/backends/plotly.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index d6a712c8..42f19374 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -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