diff --git a/pandora_console/include/functions_netflow.php b/pandora_console/include/functions_netflow.php index 9f016ac88a..247b81a816 100644 --- a/pandora_console/include/functions_netflow.php +++ b/pandora_console/include/functions_netflow.php @@ -1570,8 +1570,12 @@ function netflow_draw_item( ); // Theme. - $theme = $config['style']; - $text_color = ($theme !== 'pandora_black') ? '#333' : '#fff'; + $user_info = get_user_info($config['id_user']); + if (isset($user_info['id_skin']) === true && (int) $user_info['id_skin'] === 2) { + $text_color = '#ffffff'; + } else { + $text_color = '#333333'; + } $graph_output = pie_graph( $pie_data, diff --git a/pandora_console/vendor/artica/phpchartjs/src/Renderer/JavaScript.php b/pandora_console/vendor/artica/phpchartjs/src/Renderer/JavaScript.php index 6b4848cb00..9462f5c803 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/Renderer/JavaScript.php +++ b/pandora_console/vendor/artica/phpchartjs/src/Renderer/JavaScript.php @@ -128,6 +128,13 @@ class JavaScript extends Renderer } } };'; + + if ($this->chart->options()->getTheme() !== null) { + if ((int) $this->chart->options()->getTheme() === 2) { + $script[] = 'Chart.defaults.color = "#ffffff";'; + } + } + $script[] = 'Chart.register(chart_watermark_'.$this->chart->getId().');'; } @@ -163,6 +170,10 @@ class JavaScript extends Renderer if (chart.config.options.title !== undefined ) { chart.config.options.title.fontColor = "#ffffff"; } + + if (chart.config.options.plugins.legend.labels.font !== undefined ) { + chart.config.options.plugins.legend.labels.font.color = "#ffffff"; + } '; } }