☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Link new Legend module to Charts glyphs (Area)

Community Support
jakko_deken
jakko_deken

Hey all,

I was excited with the news of the new future to place legends outside the charts. I wanted to do this with an Area chart, but i can’t get to get the link to the renderers right.

 areaplot = Area(data=data,x="xcolli",y=["pal_prod","ffo_prod","empt_ffo_prod","empty_pal_prod"], title=io2,xlabel='Colli',       ylabel='#Lokaties',stack=True,palette=palette)     

 legend = Legend(legends=[

 ("pal_prod", areaplot.renderers[1]),

 ("ffo_prod", areaplot.renderers[2]),

 ("empt_ffo_prod", areaplot.renderers[3]),

 ("empty_pal_prod", areaplot.renderers[4]),], location=(0, -30))

 areaplot.add_layout(legend,"right") 

Ofcourse this does not make sense. Normally you can enter the glyphs through renderers but with the Chart module this is not the case. Anyone can help me out making the links to the areas?

Kind regards,

Jakko

⌁   Link to post

End of archived discussion · Replies are disabled