diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-07-02 20:55:35 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-07-02 20:55:49 +0400 |
commit | fa838575cef6f9a7b36f5dac56c96bc81b71abe9 (patch) | |
tree | ac196e0adfe351e30238ed3a53cf6d999059b113 /plugins/CoreVisualizations/JqplotDataGenerator.php | |
parent | 0a8e680552047f0140450a9cfbcc6f9f5491ec2e (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.php | 5 |
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); } |