mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
#10691 added image no data in pue graph
This commit is contained in:
parent
0e58a9b2fb
commit
7c99e788c7
@ -586,10 +586,26 @@ class TopNWidget extends Widget
|
||||
break;
|
||||
|
||||
case 'pie':
|
||||
$output .= pie_graph(
|
||||
$data,
|
||||
$options
|
||||
);
|
||||
$empty = true;
|
||||
foreach ($data as $key => $value) {
|
||||
if ($value > 0) {
|
||||
$empty = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($empty === true) {
|
||||
$output .= html_print_image(
|
||||
'images/no_data_toshow.png',
|
||||
true,
|
||||
[ 'style' => 'width: 60%;' ]
|
||||
);
|
||||
} else {
|
||||
$output .= pie_graph(
|
||||
$data,
|
||||
$options
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user