From e8740b1966cf021e940f6d539662324a96aa9adf Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 9 Apr 2019 12:41:14 +0200 Subject: [PATCH] Default value changes in BarsGraph and DonutGraph Former-commit-id: 57ace29b4cdcd075ddceb146b1344d3e61b2b1dd --- .../rest-api/models/VisualConsole/Items/BarsGraph.php | 10 +++++----- .../rest-api/models/VisualConsole/Items/DonutGraph.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/BarsGraph.php b/pandora_console/include/rest-api/models/VisualConsole/Items/BarsGraph.php index a7c91122ae..91a7abcd35 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/BarsGraph.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/BarsGraph.php @@ -54,11 +54,11 @@ final class BarsGraph extends Item * * @return mixed String representing the grid color (not empty) or null. */ - private function extractGridColor(array $data) + private function extractGridColor(array $data): string { return static::notEmptyStringOr( static::issetInArray($data, ['gridColor', 'border_color']), - null + '#000000' ); } @@ -104,11 +104,11 @@ final class BarsGraph extends Item ); switch ($typeGraph) { - case 'vertical': - return 'vertical'; + case 'horizontal': + return 'horizontal'; default: - return 'horizontal'; + return 'vertical'; } } diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/DonutGraph.php b/pandora_console/include/rest-api/models/VisualConsole/Items/DonutGraph.php index 111c6e8373..93ab7bffe8 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/DonutGraph.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/DonutGraph.php @@ -70,7 +70,7 @@ final class DonutGraph extends Item 'border_color', ] ), - null + '#000000' ); }