diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php
index 045712786e..7613515b17 100644
--- a/html/includes/functions.inc.php
+++ b/html/includes/functions.inc.php
@@ -205,6 +205,8 @@ function generate_graph_popup($graph_array)
$graph_array['from'] = $config['time']['year'];
$content .= generate_graph_tag($graph_array);
$content .= "";
+
+ $graph_array['link'] = "graphs/type=" . $graph_array['type'] . "/id=" . $graph_array['id'];
return overlib_link($graph_array['link'], $graph, $content, NULL);
}