Skip to content

Commit

Permalink
score error
Browse files Browse the repository at this point in the history
  • Loading branch information
josephv7 committed Nov 9, 2018
1 parent c22d120 commit 649a46b
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 22 deletions.
23 changes: 1 addition & 22 deletions src/registration.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,31 +210,10 @@ <h2 style="font-family: 'Titillium Web', bold;font-weight: 300; text-align:cente
}
});

// var uid = firebase.auth().currentUser.uid;
// console.log(uid);
// var ref = firebase.database().ref();
// var user = firebase.auth().currentUser;
// if(user){
// // uid = user.uid;
// }else{
// //nothing
// }

// ref.child('reg_captains').on("value", function(snapshot) {
// var house = snapshot.child(uid).val();
// console.log(house);
// });




</script>

<!-- <script>
$( document ).ready(function() {
$('.house').attr("required",true);
});
</script> -->

</body>

</html>
115 changes: 115 additions & 0 deletions src/score.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">
<meta content=#000000 name=theme-color>
<meta content=#000000 name=msapplication-navbutton-color>
<meta content=#000000 name=apple-mobile-web-app-status-bar-style>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta charset="UTF-8">
<title>Live Scores</title>
<meta name="keywords" content="bharatham, bharatham2k18, RSET, TEDxRSET, NAAC, FISAT, kochi, kakkanad">
<meta name="robots" content="index, follow">
<link rel="icon" type="image/ico" href="https://www.rajagiritech.ac.in/Home/images/favicon.ico">
<meta property="og:title" content="BHARATHAM 2K18">
<meta property="og:site_name" content="BHARATHAM 2K18 | NOVEMBER 8,9,10| RSET">
<meta property="og:url" content="https://www.bharatham2k18.in">
<meta property="og:title" content="">
<!-- <meta property="og:image" content="https://www.rajagiritech.ac.in/Home/saavishkar2018/images/logos/Saav_logo.png"> -->
<meta property="og:description" content="Bharatham, the two-day intra-college arts festival is a true amalgamation of bhavam, raagam and thaalam.">



<meta property="og:title" content="BHARATHAM 2K18">
<meta property="og:site_name" content="BHARATHAM 2K18 | NOVEMBER 8,9,10| RSET">
<meta property="og:url" content="https://www.bharatham2k18.in">
<meta property="og:title" content="">
<!-- <meta property="og:image" content="https://www.rajagiritech.ac.in/Home/saavishkar2018/images/logos/Saav_logo.png"> -->
<meta property="og:description" content="Bharatham, the two-day intra-college arts festival is a true amalgamation of bhavam, raagam and thaalam.">

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-124518309-3"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());

gtag('config', 'UA-124518309-3');
</script>

</head>

<body>

<div id="barchart_values" style="width: 900px; height: 300px;"></div>

<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.5.6/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.5.6/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.5.6/firebase-database.js"></script>

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">


var config = {
apiKey: "AIzaSyDGk80A4ORHww9y7mGFgLS2YBXIZISA-ZQ",
authDomain: "bharatham2k18-903ae.firebaseapp.com",
databaseURL: "https://bharatham2k18-903ae.firebaseio.com",
projectId: "bharatham2k18-903ae",
storageBucket: "bharatham2k18-903ae.appspot.com",
messagingSenderId: "46039964633"
};
firebase.initializeApp(config);

var aghoras, aryans, mughals, rajputs, spartans, vikings;
firebase.database().ref().child('Score').child('House').once("value", function (snapshot) {
// var house = snapshot.child(uid).val();
aghoras = snapshot.val().child('aghoras');
aryans = snapshot.val().child('aryans');
mughals = snapshot.val().child('mughals');
rajputs = snapshot.val().child('rajputs');
spartans = snapshot.val().child('spartans');
vikings = snapshot.val().child('vikings');
})

console.log('aghoras',aghoras);
google.charts.load("current", { packages: ["corechart"] });
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
["House", "Points", { role: "style" }],
["Aghoras", +aghoras, "#b87333"],
["Aryans", +aryans, "silver"],
["Mughals", +mughals, "gold"],
["Rajputs", +rajputs, "gold"],
["Spartans", +spartans, "color: #e5e4e2"],
["Vikings", +vikings, "color: #e5e4e2"]
]);

var view = new google.visualization.DataView(data);
view.setColumns([0, 1,
{
calc: "stringify",
sourceColumn: 1,
type: "string",
role: "annotation"
},
2]);

var options = {

width: 1000,
height: 1000,
bar: { groupWidth: "95%" },
legend: { position: "none" },
};
var chart = new google.visualization.BarChart(document.getElementById("barchart_values"));
chart.draw(view, options);
}
</script>

</body>

</html>

0 comments on commit 649a46b

Please sign in to comment.