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:
authordiosmosis <benakamoorthi@fastmail.fm>2014-07-02 20:55:35 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2014-07-02 20:55:49 +0400
commitfa838575cef6f9a7b36f5dac56c96bc81b71abe9 (patch)
treeac196e0adfe351e30238ed3a53cf6d999059b113 /plugins/CoreVisualizations/JqplotDataGenerator.php
parent0a8e680552047f0140450a9cfbcc6f9f5491ec2e (diff)
Only remove 'label' series for bar graphs in jqplot data generation if it actually exists. It does not exist after graph state has been persisted in the option table.
Diffstat (limited to 'plugins/CoreVisualizations/JqplotDataGenerator.php')
-rw-r--r--plugins/CoreVisualizations/JqplotDataGenerator.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/CoreVisualizations/JqplotDataGenerator.php b/plugins/CoreVisualizations/JqplotDataGenerator.php
index 53771355b5..fc7cdde8a6 100644
--- a/plugins/CoreVisualizations/JqplotDataGenerator.php
+++ b/plugins/CoreVisualizations/JqplotDataGenerator.php
@@ -138,7 +138,10 @@ class JqplotDataGenerator
// the bar charts contain the labels a first series
// this series has to be removed from the units
- if ($this->graphType == 'bar') {
+ reset($units);
+ if ($this->graphType == 'bar'
+ && key($units) == 'label'
+ ) {
array_shift($units);
}