Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Annotations/templates')
-rwxr-xr-xplugins/Annotations/templates/annotations.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/Annotations/templates/annotations.js b/plugins/Annotations/templates/annotations.js
index f04847ef5b..0c6975f011 100755
--- a/plugins/Annotations/templates/annotations.js
+++ b/plugins/Annotations/templates/annotations.js
@@ -600,6 +600,12 @@ var placeEvolutionIcons = function (annotations, graphElem)
var canvases = $('.piwik-graph .jqplot-xaxis canvas', graphElem),
noteSize = 16;
+ // if no graph available, hide all icons
+ if (!canvases || canvases.length == 0) {
+ $('span', annotations).hide();
+ return true;
+ }
+
// set position of each individual icon
$('span', annotations).each(function(i) {
var canvas = $(canvases[i]),