/**
* @ngdoc controller
* @name accountCtrl
* @description Handles all Account-Specific functions
* @requires $scope
* @requires $filter
* @requires $timeout
* @requires $state
* @requires Restangular
* @requires $http
* @requires $rootScope
* @memberof ClientAppr
*/
app.controller("accountCtrl",
[
'$scope',
'$filter',
'$timeout',
'$state',
'Restangular',
'$http',
'$rootScope',
function(scope, filter, timeout, state, Restangular, $http, rootScope) {
create_graph();
scope.show = false;
scope.login = function login(){
console.log('Hi');
state.go('account.home');
}
function create_graph(){
scope.account={};
scope.account.graph = {
options: {
//This is the Main Highcharts chart config. Any Highchart options are valid here.
//will be overriden by values specified below.
chart: {
type: 'line'
},
tooltip: {
style: {
padding: 10,
fontWeight: 'bold'
}
}
},
//The below properties are watched separately for changes.
//Series object (optional) - a list of series using normal Highcharts series options.
series: [{
data: [10, 15, 12, 8, 7]
}],
//Title configuration (optional)
title: {
text: 'Trend Analysis'
},
//Boolean to control showing loading status on chart (optional)
//Could be a string if you want to show specific loading text.
loading: false,
//Configuration for the xAxis (optional). Currently only one x axis can be dynamically controlled.
//properties currentMin and currentMax provided 2-way binding to the chart's maximum and minimum
xAxis: {
title: {text: 'Days of the Week'}
},
//Whether to use Highstocks instead of Highcharts (optional). Defaults to false.
useHighStocks: false,
//size (optional) if left out the chart will default to size of the div or something sensible.
//categories:['Monday','Tuesday','Wednesday','Thursday','Friday'],
//function (optional)
func: function (chart) {
//setup some logic for the chart
}
};
}
scope.showGraph = function showGraph(){
if(scope.show==true){
scope.show=false;
}
else{
scope.show=true
}
}
}
]);