From The Document Foundation Wiki
How do I draw a contiguous legend?
The Drawing toolbar (▸ ▸ ) has a toolbar named Callouts, to the right side of the Flowchart icon. In this toolbar, there is a dropdown menu called Line Style. Line Style items, such as Continuous, Ultrafine Dashed, Fine Dotted, and etc., allow you to draw legends with connectors of various shapes (draw first, then change the line style).
The FAQ for the Draw module How do I draw a contiguous legend? contains more explanations on how to use this tool.