Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
K
kiosqueip
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza Arfaoui
kiosqueip
Commits
240cf92c
Commit
240cf92c
authored
May 31, 2024
by
Hamza Arfaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CAFI176
parent
5a253552
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
2 deletions
+34
-2
index.php
statistiques/index.php
+34
-2
No files found.
statistiques/index.php
View file @
240cf92c
...
...
@@ -2584,7 +2584,39 @@ function graph_data($vars, $data, $colors)
{
$settings
[
'label_colour'
]
=
$vars
[
'label_colour'
];
}
if
(
$vars
[
'graph_mode'
]
==
'rdv_percent'
||
$vars
[
'graph_mode'
]
==
'presta_percent'
||
$vars
[
'graph_mode'
]
==
'nfc_percent'
){
$settings
[
'grid_division_v'
]
=
10
;
}
if
(
$vars
[
'graph_mode'
]
==
'dma'
||
$vars
[
'graph_mode'
]
==
'dme'
||
$vars
[
'graph_mode'
]
==
'dma-dme'
){
$max_time
=
0
;
foreach
(
$data
as
$row
)
{
if
(
$vars
[
'graph_mode'
]
==
'dma'
){
if
(
intval
(
$row
[
"dma"
])
>
$max_time
){
$max_time
=
intval
(
$row
[
"dma"
]);
}
}
if
(
$vars
[
'graph_mode'
]
==
'dme'
){
if
(
intval
(
$row
[
"dme"
])
>
$max_time
){
$max_time
=
intval
(
$row
[
"dme"
]);
}
}
if
(
$vars
[
'graph_mode'
]
==
'dma-dme'
){
if
(
intval
(
$row
[
"dma-dme"
])
>
$max_time
){
$max_time
=
intval
(
$row
[
"dma-dme"
]);
}
}
}
if
(
$max_time
>
1000
&&
$max_time
<
8000
){
$graph_modes
[
5
][
'spacing'
]
=
1000
;
$graph_modes
[
6
][
'spacing'
]
=
1000
;
$graph_modes
[
7
][
'spacing'
]
=
1000
;
}
if
(
$max_time
>
8000
){
$graph_modes
[
5
][
'spacing'
]
=
3600
;
$graph_modes
[
6
][
'spacing'
]
=
3600
;
$graph_modes
[
7
][
'spacing'
]
=
3600
;
}
}
foreach
(
$graph_modes
as
$graph_mode
)
{
if
(
!
empty
(
$vars
[
'graph_mode'
])
&&
$graph_mode
[
'id'
]
==
$vars
[
'graph_mode'
]
||
empty
(
$vars
[
'graph_mode'
])
&&
$graph_mode
[
'id'
]
==
'count'
)
...
...
@@ -2943,7 +2975,7 @@ function hms($laps)
{
$laps
=
sprintf
(
"%.0f"
,
$laps
);
if
(
$laps
>=
3600
)
return
sprintf
(
"%d:%02d:%02d"
,
$laps
/
3600
,
(
$laps
/
60
)
%
60
,
$laps
%
60
);
return
sprintf
(
"%d:%02d:%02d"
,
(
int
)(
$laps
/
3600
),
(
int
)
(
$laps
/
60
)
%
60
,
$laps
%
60
);
else
return
sprintf
(
"%2d:%02d"
,
$laps
/
60
,
$laps
%
60
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment