diff --git a/views/charts_plugin_style_chart.inc b/views/charts_plugin_style_chart.inc index 7efb891f2f11dcf8af4c5cbbb04d92fc29f96df8..2eb0d79f8d70c3eab8bc82122045795cc757d26a 100644 --- a/views/charts_plugin_style_chart.inc +++ b/views/charts_plugin_style_chart.inc @@ -265,6 +265,12 @@ class charts_plugin_style_chart extends views_plugin_style { // Execute the subview and get the result. $subview->pre_execute(); $subview->execute(); + + // If there's no results, don't attach the subview. + if (empty($subview->result)) { + continue; + } + $subchart = $subview->style_plugin->render($subview->result); $subview->post_execute(); unset($subview);