fix(widgets): Prevent chart legend from rendering when no dataset has a name

This commit is contained in:
Jeremy Day 2018-08-19 19:03:22 -04:00 committed by Florian Dehau
parent 05c96eaa28
commit cfc90ab7f6

View file

@ -322,6 +322,7 @@ where
let legend_height = self.datasets.len() as u16 + 2;
if legend_width < layout.graph_area.width / 3
&& legend_height < layout.graph_area.height / 3
&& inner_width > 0
{
layout.legend_area = Some(Rect::new(
layout.graph_area.right() - legend_width,