diff --git a/flot.module b/flot.module index b671ea2..9f59b10 100644 --- a/flot.module +++ b/flot.module @@ -100,6 +100,9 @@ function template_preprocess_flot_graph(&$variables) { } $variables['options'] = $options; $legend_element = array(); + if (!isset($options->legend->position)) { + $options->legend->position = 'bottom'; + } if (isset($options->legend) && isset($options->legend->position) && $options->legend->position == 'bottom' && !isset($options->legend->container)) { $variables['element']['legendid'] = $variables['element']['id'] . '-legend'; $options->legend->container = '#' . $variables['element']['legendid'];