#9029 Added starmap 3

This commit is contained in:
Daniel Maya 2022-07-12 16:18:17 +02:00
parent 4f7918114b
commit 9d259a4097
4 changed files with 19 additions and 5 deletions

View File

@ -2558,7 +2558,8 @@ function combined_graph_summatory_average(
function graphic_agentaccess(
int $id_agent,
int $period=0,
?bool $return=false
?bool $return=false,
?bool $agent_view=false
) {
global $config;
@ -2599,6 +2600,10 @@ function graphic_agentaccess(
$options = [];
$options['grid']['hoverable'] = true;
if ($agent_view === true) {
$options['agent_view'] = true;
}
if ($return === true) {
return vbar_graph($data_array, $options, 1);
} else {

View File

@ -494,7 +494,7 @@ function vbar_graph(
'weight' => $options['x']['font']['weight'],
'family' => $options['x']['font']['family'],
'variant' => $options['x']['font']['variant'],
'color' => $options['x']['font']['color'],
'color' => ($options['agent_view'] === true) ? 'black' : $options['x']['font']['color'],
],
'show' => $options['x']['show'],
'position' => $options['x']['position'],
@ -516,7 +516,7 @@ function vbar_graph(
'weight' => $options['y']['font']['weight'],
'family' => $options['y']['font']['family'],
'variant' => $options['y']['font']['variant'],
'color' => $options['y']['font']['color'],
'color' => ($options['agent_view'] === true) ? 'black' : $options['y']['font']['color'],
],
'show' => $options['y']['show'],
'position' => $options['y']['position'],
@ -534,8 +534,8 @@ function vbar_graph(
'aboveData' => $options['grid']['aboveData'],
'color' => $options['grid']['color'],
'backgroundColor' => $options['grid']['backgroundColor'],
'margin' => $options['grid']['margin'],
'labelMargin' => $options['grid']['labelMargin'],
'margin' => ($options['agent_view'] === true) ? 6 : $options['grid']['margin'],
'labelMargin' => ($options['agent_view'] === true) ? 12 : $options['grid']['labelMargin'],
'axisMargin' => $options['grid']['axisMargin'],
'markings' => $options['grid']['markings'],
'borderWidth' => $options['grid']['borderWidth'],
@ -561,6 +561,10 @@ function vbar_graph(
],
];
if ($options['agent_view'] === true) {
$params['agent_view'] = true;
}
if (empty($params['data']) === true) {
return graph_nodata_image(
0,

View File

@ -670,6 +670,10 @@ function flot_vcolumn_chart(array $options)
$style .= 'height:'.$options['generals']['pdf']['height'].'px;';
}
if ($options['agent_view'] === true) {
$style = 'width: 95%; height: 85px';
}
$class = '';
if ($options['generals']['rotate'] === true) {
$class = 'bars-graph-rotate';

View File

@ -602,6 +602,7 @@ if ($config['agentaccess'] && $access_agent > 0) {
$table_access_rate .= graphic_agentaccess(
$id_agente,
SECONDS_1DAY,
true,
true
);
$table_access_rate .= '</div>';