From beace34567c88c54ff487ca137778d81e233a07f Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Tue, 2 Jul 2019 13:12:05 +0200 Subject: [PATCH] Created black theme - #4194 --- .../include/graphs/functions_d3.php | 25 +++++- pandora_console/include/graphs/pandora.d3.js | 14 ++- .../include/styles/pandora_black.css | 88 ++++++++++++++----- 3 files changed, 102 insertions(+), 25 deletions(-) diff --git a/pandora_console/include/graphs/functions_d3.php b/pandora_console/include/graphs/functions_d3.php index b9f2212b16..e3962bf729 100644 --- a/pandora_console/include/graphs/functions_d3.php +++ b/pandora_console/include/graphs/functions_d3.php @@ -740,6 +740,8 @@ function print_donut_narrow_graph( array $data, $data_total ) { + global $config; + if (empty($data)) { return graph_nodata_image($width, $height, 'pie'); } @@ -754,10 +756,31 @@ function print_donut_narrow_graph( $graph_id = uniqid('graph_'); + // This is for "Style template" in visual styles. + switch ($config['style']) { + case 'pandora': + $textColor = '#000'; + $strokeColor = '#fff'; + break; + + case 'pandora_black': + $textColor = '#fff'; + $strokeColor = '#222'; + break; + + default: + $textColor = '#000'; + $strokeColor = 'transparent'; + break; + } + + $textColor = json_encode($textColor); + $strokeColor = json_encode($strokeColor); + $out = "
"; $out .= include_javascript_d3(true); $out .= "