#13507 Fixed dark theme style in the Netflow explorer chart label.

This commit is contained in:
Jorge Rincon 2024-04-29 13:04:01 +02:00
parent 706ecec9d8
commit a2ab92f90b
2 changed files with 17 additions and 2 deletions

View File

@ -1570,8 +1570,12 @@ function netflow_draw_item(
); );
// Theme. // Theme.
$theme = $config['style']; $user_info = get_user_info($config['id_user']);
$text_color = ($theme !== 'pandora_black') ? '#333' : '#fff'; if (isset($user_info['id_skin']) === true && (int) $user_info['id_skin'] === 2) {
$text_color = '#ffffff';
} else {
$text_color = '#333333';
}
$graph_output = pie_graph( $graph_output = pie_graph(
$pie_data, $pie_data,

View File

@ -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().');'; $script[] = 'Chart.register(chart_watermark_'.$this->chart->getId().');';
} }
@ -163,6 +170,10 @@ class JavaScript extends Renderer
if (chart.config.options.title !== undefined ) { if (chart.config.options.title !== undefined ) {
chart.config.options.title.fontColor = "#ffffff"; chart.config.options.title.fontColor = "#ffffff";
} }
if (chart.config.options.plugins.legend.labels.font !== undefined ) {
chart.config.options.plugins.legend.labels.font.color = "#ffffff";
}
'; ';
} }
} }