diff --git a/mainJs.js b/mainJs.js index 3cf6f6b..408f043 100644 --- a/mainJs.js +++ b/mainJs.js @@ -4,9 +4,7 @@ google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawAgeChart); google.charts.setOnLoadCallback(drawIncomeChart); google.charts.setOnLoadCallback(drawCityChart); - function drawChart() { - var data = google.visualization.arrayToDataTable([ ['Task', 'Amount'], ['Dining', 38.30], @@ -16,14 +14,10 @@ google.charts.load('current', {'packages':['corechart']}); ['Entertainment', 20.50], ['Other', 320.40] ]); - - var options = { title: 'Spending Breakdown' }; - var chart = new google.visualization.PieChart(document.getElementById('piechart')); - chart.draw(data, options); } @@ -37,7 +31,6 @@ google.charts.load('current', {'packages':['corechart']}); ['Entertainment', 20.50, 24.04], ['Other', 320.40, 45.03] ]); - var options = { chart: { title: 'Spending Comparison', @@ -45,12 +38,9 @@ google.charts.load('current', {'packages':['corechart']}); }, bars: 'horizontal' // Required for Material Bar Charts. }; - - var chart = new google.charts.Bar(document.getElementById('barchart_material')); - + var chart = new google.charts.Bar(document.getElementById('age_chart')); chart.draw(data, google.charts.Bar.convertOptions(options)); } - function drawIncomeChart() { var data = google.visualization.arrayToDataTable([ ['Category', 'You', 'Average Person of Your Income'], @@ -61,7 +51,6 @@ google.charts.load('current', {'packages':['corechart']}); ['Entertainment', 20.50, 25.92], ['Other', 320.40, 105.25] ]); - var options = { chart: { title: 'Spending Comparison', @@ -69,9 +58,7 @@ google.charts.load('current', {'packages':['corechart']}); }, bars: 'horizontal' // Required for Material Bar Charts. }; - - var chart = new google.charts.Bar(document.getElementById('barchart_material')); - + var chart = new google.charts.Bar(document.getElementById('income_chart')); chart.draw(data, google.charts.Bar.convertOptions(options)); } @@ -85,7 +72,6 @@ google.charts.load('current', {'packages':['corechart']}); ['Entertainment', 20.50, 11.42], ['Other', 320.40, 104.13] ]); - var options = { chart: { title: 'Spending Comparison', @@ -93,8 +79,6 @@ google.charts.load('current', {'packages':['corechart']}); }, bars: 'horizontal' // Required for Material Bar Charts. }; - - var chart = new google.charts.Bar(document.getElementById('barchart_material')); - + var chart = new google.charts.Bar(document.getElementById('city_chart')); chart.draw(data, google.charts.Bar.convertOptions(options)); } diff --git a/prof.css b/prof.css index 1ee1b68..bb8588a 100644 --- a/prof.css +++ b/prof.css @@ -41,6 +41,7 @@ div.firstchart { div.text { border-top: 1px solid #45d7e8; + z-index: 5; } div.trans { @@ -77,3 +78,28 @@ div.catRow { font-size: 20px; text-align: right; } + +div.bar { + overflow: hidden; +} +div.barchart { + height: 700px; + margin-top: -50px; +} +div.compareText { + font-family: 'Dosis', sans-serif; + font-size: 75px; + text-align: center; + color: grey; + border-bottom: 1px solid #45d7e8; +} +div.diffGraphs { + font-family: 'Dosis', sans-serif; + margin: 70px 0 50px 0; + color: green; + font-size: 30px; + text-align: center; +} +.btnC { + width: 100px; +} diff --git a/profJs.js b/profJs.js new file mode 100644 index 0000000..beeeb2a --- /dev/null +++ b/profJs.js @@ -0,0 +1,22 @@ +/* $(document).ready({ + $('#city_chart').hide(); + $('#income_chart').hide(); + $('.age').click(function() { + $('#age_chart').fadeIn(); + $('#city_chart').hide(); + $('#income_chart').hide(); +}); + + $('.income').click(function() { + $('#income_chart').fadeIn(); + $('#age_chart').hide(); + $('#city_chart').hide(); +}); + + $('.city').click(function() { + $('#city_chart').fadeIn(); + $('#age_chart').hide(); + $('#income_chart').hide(); +}); + +}); diff --git a/profile.html b/profile.html index ca36923..2678195 100644 --- a/profile.html +++ b/profile.html @@ -4,11 +4,13 @@ + +
@@ -134,8 +136,38 @@ +