Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mytime
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Narendar Vakiti
mytime
Commits
a9b11b7c
Commit
a9b11b7c
authored
Jun 10, 2019
by
Soumya Gouri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed_chart_url
parent
65cd588a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
14 deletions
+32
-14
ChartsController.js
src/main/webapp/WEB-INF/controllers/ChartsController.js
+30
-12
charts.html
src/main/webapp/WEB-INF/templates/charts.html
+2
-2
No files found.
src/main/webapp/WEB-INF/controllers/ChartsController.js
View file @
a9b11b7c
...
...
@@ -3,16 +3,34 @@ myApp.directive('hcPieChart', function () {
restrict
:
'E'
,
template
:
'<div></div>'
,
link
:
function
(
scope
,
element
)
{
getEmployeeDetails
(
scope
,
element
[
0
].
baseURI
+
'reports/billabilityByFunctionalGroup'
,
'column'
,
element
,
"Billability By Functional Group"
);
//
getEmployeeDetails(scope,element[0].baseURI+'reports/billabilityByFunctionalGroup','column',element,"Billability By Functional Group");
//getEmployeeDetails(scope,element[0].baseURI+'reports/getBillabilityDetailsByAccount','column',element,"Billability By Account");
scope
.
clickMe
=
function
()
{
if
(
scope
.
reportId
==
1
){
getEmployeeDetails
(
scope
,
element
[
0
].
baseURI
+
'reports/getBillabilityDetailsByAccount'
,
'column'
,
element
,
" Billability By Account"
);
}
else
if
(
scope
.
reportId
==
2
){
getEmployeeDetails
(
scope
,
element
[
0
].
baseURI
+
'reports/billabilityByFunctionalGroup'
,
'column'
,
element
,
"Billability By Functional Group"
);
}
else
if
(
scope
.
reportId
==
3
){
getEmployeeDetails
(
scope
,
element
[
0
].
baseURI
+
'reports/getBillabilityDetailsByMonth'
,
'line'
,
element
,
" Billability Monthly Trends"
);
}
scope
.
clickMe
=
function
(
value
)
{
console
.
log
(
value
);
console
.
log
(
value
.
Name
);
if
(
value
.
Id
==
1
)
{
uri
=
'Account'
;
chart
=
'column'
;
}
else
if
(
value
.
Id
==
2
){
uri
=
'FunctionalGroup'
;
chart
=
'column'
;
}
else
if
(
value
.
Id
==
3
){
uri
=
'Month'
;
chart
=
'line'
;
}
desc
=
value
.
Name
;
console
.
log
(
desc
);
getEmployeeDetails
(
scope
,
element
[
0
].
baseURI
+
'reports/getBarChartReport?byType='
+
uri
,
chart
,
element
,
desc
);
//alert(value);
// if(scope.reportId == 1){
// getEmployeeDetails(scope,element[0].baseURI+'reports/getBillabilityDetailsByAccount','column',element," Billability By Account");
// }else if(scope.reportId == 2){
// getEmployeeDetails(scope,element[0].baseURI+'reports/billabilityByFunctionalGroup','column',element,"Billability By Functional Group");
// }else if(scope.reportId == 3){
// getEmployeeDetails(scope,element[0].baseURI+'reports/getBillabilityDetailsByMonth','line',element," Billability Monthly Trends");
// }
}
}
};
...
...
@@ -21,10 +39,10 @@ myApp.directive('hcPieChart', function () {
$scope
.
name
=
[];
$scope
.
records
=
[];
$scope
.
empSearchId
=
""
;
//
$scope.reportId = "1"
$scope
.
reportId
=
"2"
$scope
.
reportId
=
"1"
//
$scope.reportId = "2"
$scope
.
reports
=
$scope
.
reportId
;
$scope
.
reports
=
[
/*{Name:"Billability Report",Id:"1"},*/
{
Name
:
"Billability By Functional Group"
,
Id
:
"2"
},{
Name
:
"Billability Monthly Trends"
,
Id
:
"3"
}];
$scope
.
reports
=
[
{
Name
:
"Billability By Account"
,
Id
:
"1"
},
{
Name
:
"Billability By Functional Group"
,
Id
:
"2"
},{
Name
:
"Billability Monthly Trends"
,
Id
:
"3"
}];
$scope
.
employees
=
[];
...
...
src/main/webapp/WEB-INF/templates/charts.html
View file @
a9b11b7c
...
...
@@ -5,9 +5,9 @@
id=
"popupContainer"
ng-controller=
"chartsController"
>
<div
class=
"text-right"
>
Report Type:
<select
ng-model=
"reportId"
ng-change=
"clickMe()"
ng-options=
"report.Id as report.Name for report in reports"
></select>
Report Type:
<select
ng-model=
"report"
#
ref
ng-change=
"clickMe(report)"
ng-options=
"report.Name for report in reports"
></select>
</div>
<hc-pie-chart
title=
"Browser usage"
data=
"pieData"
options=
"chartOptions"
>
Placeholder for pie chart
</hc-pie-chart>
<div
class=
"row col-lg-12"
>
...
...
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