diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2019-05-25 00:18:03 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2019-05-25 00:18:03 +0300 |
commit | 871c31d0962a144b85ca2601a24b9d10ab707bfc (patch) | |
tree | fd5c680f7f480319ee521b54e604c351f11a7f55 /plugins/CoreVisualizations/Visualizations | |
parent | b9df06dadfd8030401bb9ae1b8126e4cf13f33b5 (diff) |
Changed period in row evolution breaks graph/metric association (#14423)
* Changed period in row evolution breaks graph/metric association
fix #14208
worked for me, also with multi row evolution. Only known issue I found is if requesting eg first yearly row evolution which may have the `users` metric hidden, then switching to `day` period, and then the `users` metric is maybe supposed to become available but didn't. That should be quite edge case though.
* add class whether row is hidden
* Fixing couple regressions visible in ui tests.
* fix build + update comment
* tweak
* test tweak
Diffstat (limited to 'plugins/CoreVisualizations/Visualizations')
-rw-r--r-- | plugins/CoreVisualizations/Visualizations/Graph.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/CoreVisualizations/Visualizations/Graph.php b/plugins/CoreVisualizations/Visualizations/Graph.php index 1dbdfc824e..28ffab7768 100644 --- a/plugins/CoreVisualizations/Visualizations/Graph.php +++ b/plugins/CoreVisualizations/Visualizations/Graph.php @@ -201,7 +201,12 @@ abstract class Graph extends Visualization $columnsToDisplay = $this->removeLabelFromArray($columnsToDisplay); // Strip out any columns_to_display that are not in the dataset - $allColumns = $this->getDataTable()->getColumns(); + $allColumns = []; + if ($this->report) { + $allColumns = $this->report->getAllMetrics(); + } + $allColumns = array_merge($allColumns, $this->getDataTable()->getColumns()); + $allColumns = array_unique($allColumns); // If the datatable has no data, use the default columns (there must be data for evolution graphs or else nothing displays) if (empty($allColumns)) { |