From 750bae0ef422028970041f150a899873915eafe4 Mon Sep 17 00:00:00 2001 From: danswick Date: Wed, 18 Feb 2015 15:23:06 -0600 Subject: [PATCH 01/18] add CNAME back --- CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..7ca5eac --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +deltalumin.com From cc457b6a2b84a6115ab64e19121ccd16fbf4aacd Mon Sep 17 00:00:00 2001 From: Dan Swick Date: Fri, 20 Feb 2015 18:27:53 -0600 Subject: [PATCH 02/18] Update index.html --- user-portal/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user-portal/index.html b/user-portal/index.html index fbc7555..7083979 100644 --- a/user-portal/index.html +++ b/user-portal/index.html @@ -46,7 +46,7 @@

Helping you make smarter decisions about energy use.

User ID:
- +
From 06e22ad6ac2e23506e5795d16f8d7bf2fc4a81f0 Mon Sep 17 00:00:00 2001 From: Dan Swick Date: Fri, 20 Feb 2015 18:28:38 -0600 Subject: [PATCH 03/18] Update main.css --- css/main.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/css/main.css b/css/main.css index 46f52d1..812f610 100644 --- a/css/main.css +++ b/css/main.css @@ -50,6 +50,10 @@ body { font-weight: 600; } +.textInput { + color: #000; +} + /*.shadow { -webkit-box-shadow: 0px 0px 10px 5px #ccc; /* Safari 3-4, iOS 4.0.2 - 4.2, Android 2.3+ */ -moz-box-shadow: 0px 0px 10px 5px #ccc; /* Firefox 3.5 - 3.6 */ From 479e86e77e78dd631ccfa916b17bbab127c22db3 Mon Sep 17 00:00:00 2001 From: Dan Swick Date: Fri, 20 Feb 2015 18:29:41 -0600 Subject: [PATCH 04/18] Update main.css --- css/main.css | 1 - 1 file changed, 1 deletion(-) diff --git a/css/main.css b/css/main.css index 812f610..722cfa8 100644 --- a/css/main.css +++ b/css/main.css @@ -42,7 +42,6 @@ body { #idForm * { margin: 10px 0px; - color: #fff; font-weight: 600; } From be7c1350588e7916115a2c5dd51d738e52b9610e Mon Sep 17 00:00:00 2001 From: Dan Swick Date: Fri, 20 Feb 2015 18:30:18 -0600 Subject: [PATCH 05/18] Update main.css --- css/main.css | 1 + 1 file changed, 1 insertion(+) diff --git a/css/main.css b/css/main.css index 722cfa8..4a1e0f9 100644 --- a/css/main.css +++ b/css/main.css @@ -47,6 +47,7 @@ body { #idForm #submit-button { font-weight: 600; + color: #fff; } .textInput { From 8bf16164de0fa14e11f12fc10e069e14c7b026f2 Mon Sep 17 00:00:00 2001 From: Dan Swick Date: Fri, 20 Feb 2015 18:31:53 -0600 Subject: [PATCH 06/18] Update main.css --- css/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/main.css b/css/main.css index 4a1e0f9..912894c 100644 --- a/css/main.css +++ b/css/main.css @@ -45,7 +45,7 @@ body { font-weight: 600; } -#idForm #submit-button { +#idForm #survey-button { font-weight: 600; color: #fff; } From 98aa447e7e715541b2f26db8ce533bc30ee760b3 Mon Sep 17 00:00:00 2001 From: Dan Swick Date: Sat, 21 Feb 2015 16:38:54 -0600 Subject: [PATCH 07/18] add dashboard to nav, add check for valid ID --- about/index.html | 1 + index.html | 1 + js/main.js | 21 +++++++++++++++++---- user-portal/index.html | 3 ++- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/about/index.html b/about/index.html index 0a84f4f..4b9a647 100644 --- a/about/index.html +++ b/about/index.html @@ -28,6 +28,7 @@

DELTALUMIN

diff --git a/index.html b/index.html index 4cb8132..3336a4d 100644 --- a/index.html +++ b/index.html @@ -28,6 +28,7 @@

DELTALUMIN

diff --git a/js/main.js b/js/main.js index ca71ce8..c61f777 100644 --- a/js/main.js +++ b/js/main.js @@ -1,6 +1,19 @@ $('#idForm').submit(function( e ) { e.preventDefault(); - console.log( $(this).serialize() ); - location.href = 'http://deltalumin.com/webpage/?' + $(this).serialize(); - console.log(ID); -}); \ No newline at end of file + // check for valid ID. During testing, only < 5. + if( ( parseInt($('#idForm .textInput').val()) > 0 ) && ( parseInt($('#idForm .textInput').val() ) < 5 )) { + console.log( $(this).serialize() ); + location.href = 'http://deltalumin.com/webpage/?' + $(this).serialize(); + console.log(ID); + } else { + alert("Please enter a valid ID number"); + } +}); + +function setup() { + var textInput; + textInput = $('#idForm .textInput'); + textInput.focus(); +} + +$(window).on('load', setup()); \ No newline at end of file diff --git a/user-portal/index.html b/user-portal/index.html index 7083979..c85ffec 100644 --- a/user-portal/index.html +++ b/user-portal/index.html @@ -27,7 +27,8 @@

DELTALUMIN

From 61ea9eee989d131143d90981d82054c478d9068d Mon Sep 17 00:00:00 2001 From: Dan Swick Date: Sat, 21 Feb 2015 16:41:51 -0600 Subject: [PATCH 08/18] added some notes and modified alert --- js/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index c61f777..7092bdd 100644 --- a/js/main.js +++ b/js/main.js @@ -6,10 +6,11 @@ $('#idForm').submit(function( e ) { location.href = 'http://deltalumin.com/webpage/?' + $(this).serialize(); console.log(ID); } else { - alert("Please enter a valid ID number"); + alert("Please enter a valid ID number (1-4 for now)"); // need to update alert during pilot phase } }); +// put text box in focus on page load function setup() { var textInput; textInput = $('#idForm .textInput'); From 6dcfeb78c5d13836bea4c822543edaa7aaf0bb6a Mon Sep 17 00:00:00 2001 From: Dan Swick Date: Sat, 21 Feb 2015 17:08:55 -0600 Subject: [PATCH 09/18] update styles --- css/main.css | 7 ++++++- js/main.js | 2 +- user-portal/index.html | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/css/main.css b/css/main.css index 912894c..37adbf5 100644 --- a/css/main.css +++ b/css/main.css @@ -45,6 +45,11 @@ body { font-weight: 600; } +#idForm span { + height: 40px; + margin: 10px 0px; +} + #idForm #survey-button { font-weight: 600; color: #fff; @@ -148,7 +153,7 @@ header h4 { padding: 12px 19px; border: 4px solid #fff; display: inline-block; - margin: 0px 0px 35px 0px; + /*margin: 0px 0px 35px 0px;*/ background-color: #98bdce; transition-duration: 200ms; } diff --git a/js/main.js b/js/main.js index 7092bdd..8333f2b 100644 --- a/js/main.js +++ b/js/main.js @@ -6,7 +6,7 @@ $('#idForm').submit(function( e ) { location.href = 'http://deltalumin.com/webpage/?' + $(this).serialize(); console.log(ID); } else { - alert("Please enter a valid ID number (1-4 for now)"); // need to update alert during pilot phase + document.getElementById('warningText').innerHTML = "Please enter a valid ID number (1-4 for now)."; } }); diff --git a/user-portal/index.html b/user-portal/index.html index c85ffec..2808b27 100644 --- a/user-portal/index.html +++ b/user-portal/index.html @@ -49,6 +49,8 @@

Helping you make smarter decisions about energy use.



+ +
From 2633f00907c3f403775d8344ffd477eaa66b0355 Mon Sep 17 00:00:00 2001 From: Dan Swick Date: Sat, 21 Feb 2015 17:09:57 -0600 Subject: [PATCH 10/18] extra tags... --- user-portal/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user-portal/index.html b/user-portal/index.html index 2808b27..e6e6035 100644 --- a/user-portal/index.html +++ b/user-portal/index.html @@ -49,7 +49,7 @@

Helping you make smarter decisions about energy use.



- +
From 4dc54fdace4bafe13c119c939ebb2a6c89fba4c3 Mon Sep 17 00:00:00 2001 From: danswick Date: Thu, 12 Mar 2015 10:03:48 -0500 Subject: [PATCH 11/18] add resources doc --- doc/resources.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/resources.md diff --git a/doc/resources.md b/doc/resources.md new file mode 100644 index 0000000..9f70f68 --- /dev/null +++ b/doc/resources.md @@ -0,0 +1,9 @@ +## On getting URL variables + +- http://css-tricks.com/snippets/javascript/get-url-variables/ +- http://w3lessons.info/2013/02/25/how-to-get-url-parameters-values-using-jquery/ + +## On D3 + +- Binding data - http://alignedleft.com/tutorials/d3/binding-data/ +- Simple example of working with JSON in a variable - http://jsfiddle.net/fg9MU/1/ \ No newline at end of file From 8c5c6ab6457c81ea07083a01500d2d84d95c90ee Mon Sep 17 00:00:00 2001 From: danswick Date: Thu, 12 Mar 2015 14:45:30 -0500 Subject: [PATCH 12/18] responsive styling and bugfixes :crocodile: Added 650px media query, above which the page is divided into 2 containers. Fixed calendar date bug. --- webpage/css/customTheme.css | 26 +++++++++++--- webpage/index.html | 70 ++++++++++++++++++------------------- webpage/js/user.js | 6 ++-- 3 files changed, 59 insertions(+), 43 deletions(-) diff --git a/webpage/css/customTheme.css b/webpage/css/customTheme.css index c3b9640..7b659c7 100644 --- a/webpage/css/customTheme.css +++ b/webpage/css/customTheme.css @@ -17,11 +17,15 @@ body { .make-it-proper-width{ width: 95%; } + .container-fluid{ border-style: none; width: 100%; padding-right: 0px; padding-left: 0px; + float: left; + width: 45%; + margin: 1%; } .navbar-default{ /* assigning the top bar to the entire navbar div element */ text-align: center; @@ -58,12 +62,11 @@ body { .visualizationSection { - padding: 0px 0px; - text-align: center; - background: #ffffff; - margin-left: auto; + padding: 0px 0px; + text-align: center; + background: #ffffff; + margin-left: auto; margin-right: auto; - width: 95%; } .vizDivider { margin-left: auto; @@ -338,3 +341,16 @@ border-radius: 0px; .c3-chart-text{ c } + + +/*=========================================== +MEDIA QUERIES +===========================================*/ + +@media screen and (max-width: 620px) { + .container-fluid{ + float: none; + width: 97%; + margin: 1%; +} +} \ No newline at end of file diff --git a/webpage/index.html b/webpage/index.html index cf8e144..fdcc257 100644 --- a/webpage/index.html +++ b/webpage/index.html @@ -66,53 +66,53 @@
- +
-
-
Usage History
- - - -
-
- -
- -
-
-
-
-
-
-
-
+
+
+
Usage History
+ + + +
+
+ +
+ +
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
- -
+
+
-
diff --git a/webpage/js/user.js b/webpage/js/user.js index 34f16f6..5dac6d7 100644 --- a/webpage/js/user.js +++ b/webpage/js/user.js @@ -74,7 +74,7 @@ below ======================================== */ -var vizWidth=$(window).width()*0.95; +var vizWidth=$('.visualizationSection').width()*0.95; $(".vizDivider").css("height",$(window).width()*0.025); var date = new Date(); @@ -1034,7 +1034,7 @@ function drawCalendar() { var calendarDate = new Date(); var firstDay = new Date(calendarDate.getFullYear(), calendarDate.getMonth(), 1); - var lastDay = new Date(calendarDate.getFullYear(), calendarDate.getMonth(), 0); + var lastDay = new Date(calendarDate.getFullYear(), calendarDate.getMonth() + 1, 0); // make sure it's not the end of NEXT month by using calendarDate.getMonth() + 1 var numDays = new Date(calendarDate.getFullYear(), calendarDate.getMonth(), 0).getDate(); var daysPerWeek = 7; @@ -1170,7 +1170,7 @@ function drawCalendar() { 'class': 'label-text-center-calendar', }) .text(function(d) { - return monthNames[lastDay.getMonth() + 1]; + return monthNames[lastDay.getMonth()]; // remove +1 here because we fixed it above when lastDay was declared }); calendarSVG.append("text") .attr("dy", ".35em") From 954b3f311b71732d203e1d1d4c1ba570871120a0 Mon Sep 17 00:00:00 2001 From: danswick Date: Thu, 12 Mar 2015 15:19:11 -0500 Subject: [PATCH 13/18] remove daily line chart :frowning: --- webpage/css/customTheme.css | 8 ++++---- webpage/index.html | 16 ++++------------ webpage/js/user.js | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 26 deletions(-) diff --git a/webpage/css/customTheme.css b/webpage/css/customTheme.css index 7b659c7..6a3c3c2 100644 --- a/webpage/css/customTheme.css +++ b/webpage/css/customTheme.css @@ -15,7 +15,7 @@ body { } .make-it-proper-width{ - width: 95%; + width: 100%; } .container-fluid{ @@ -24,7 +24,7 @@ body { padding-right: 0px; padding-left: 0px; float: left; - width: 45%; + width: 48%; margin: 1%; } .navbar-default{ /* assigning the top bar to the entire navbar div element */ @@ -178,7 +178,7 @@ border-radius: 0px; } .nav-tabs-app-tab{ - width: 33.333%; + width: 50%; height: 30px; } @@ -352,5 +352,5 @@ MEDIA QUERIES float: none; width: 97%; margin: 1%; -} + } } \ No newline at end of file diff --git a/webpage/index.html b/webpage/index.html index fdcc257..5e08aa1 100644 --- a/webpage/index.html +++ b/webpage/index.html @@ -74,24 +74,16 @@
Usage History
-
- -
- -
-
-
-
-
+ +
diff --git a/webpage/js/user.js b/webpage/js/user.js index 5dac6d7..79255e2 100644 --- a/webpage/js/user.js +++ b/webpage/js/user.js @@ -468,7 +468,7 @@ below ======================================== */ -var dayChartDim = { +/*var dayChartDim = { AMOffsetX: 15, PMOffsetX: (vizWidth / 25) * 14, AMPMOffsetY: 10, @@ -591,18 +591,18 @@ var chart1 = c3.generate({ } } } -}); +});*/ -var svgSoFar = d3.select("#soFarHighlight").append("svg") +/*var svgSoFar = d3.select("#soFarHighlight").append("svg") .attr("width", vizWidth) - .attr("height", dayChartDim.height + dayChartDim.soFarNotificationHeight); + .attr("height", dayChartDim.height + dayChartDim.soFarNotificationHeight);*/ // NEED TO BE FIXED TO ALIGN THE SO FAR // LOOK AT THE soFarDim variables to align the line // var percentageOffDayPassed = ((new Date().getHours() + 1) / 24 + new Date().getMinutes() / (60 * 24)); -var percentageOffDayPassed = ((new Date().getHours() + 1) / 24); +/*var percentageOffDayPassed = ((new Date().getHours() + 1) / 24); var soFarXPosition = (vizWidth - dayChartDim.paddingLeft) * percentageOffDayPassed; var soFarDim = { @@ -612,9 +612,9 @@ var soFarDim = { topOffset: 0, textLineHeight: 14, textLineOffset: 10, -} +};*/ -svgSoFar.append("line") +/*svgSoFar.append("line") .attr({ x1: function(d, i) { @@ -667,7 +667,7 @@ svgSoFar.append("text") }) .text(function(d) { return "$" + getDayTotal(); - }); + });*/ @@ -1141,7 +1141,7 @@ function drawCalendar() { .style('fill', calDim.lastDayColor) .attr({ 'x': (calDim.boxWidth + calDim.boxPadding) * boxController.x + calDim.leftPadding + calDim.boxWidth / 2, - 'y': (calDim.boxHeight + calDim.boxPadding) * boxController.y + calDim.topPadding + calDim.boxHeight / 2 + calDim.labelSpacing + 20, + 'y': (calDim.boxHeight + calDim.boxPadding) * boxController.y + calDim.topPadding + calDim.boxHeight / 2 + calDim.labelSpacing + 30, 'class': 'label-text-center-calendar', }) .text(function(d) { @@ -1154,7 +1154,7 @@ function drawCalendar() { .style('fill', calDim.lastDayColor) .attr({ 'x': (calDim.boxWidth + calDim.boxPadding) * boxController.x + calDim.leftPadding + calDim.boxWidth / 2, - 'y': (calDim.boxHeight + calDim.boxPadding) * boxController.y + calDim.topPadding + calDim.boxHeight / 2 + calDim.labelSpacing + 35, + 'y': (calDim.boxHeight + calDim.boxPadding) * boxController.y + calDim.topPadding + calDim.boxHeight / 2 + calDim.labelSpacing + 45, 'class': 'label-text-center-calendar-speechBubble', }) .text(function(d) { From 144f0f62df02e24222e64dbfad1970541370e6e3 Mon Sep 17 00:00:00 2001 From: danswick Date: Thu, 12 Mar 2015 15:32:38 -0500 Subject: [PATCH 14/18] navbar color fix :horse: --- webpage/css/customTheme.css | 6 +++++- webpage/index.html | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/webpage/css/customTheme.css b/webpage/css/customTheme.css index 6a3c3c2..f04e788 100644 --- a/webpage/css/customTheme.css +++ b/webpage/css/customTheme.css @@ -18,6 +18,11 @@ body { width: 100%; } +.container, .navbar, .navbar-inverse { + background-color: #687079; + background-image: none; +} + .container-fluid{ border-style: none; width: 100%; @@ -47,7 +52,6 @@ body { } .navbar-inverse{ - background-color: #00ff00; border:none; margin-bottom: 0; } diff --git a/webpage/index.html b/webpage/index.html index 5e08aa1..9fa7cf5 100644 --- a/webpage/index.html +++ b/webpage/index.html @@ -31,7 +31,7 @@
From 438418ece89bf851f46ae23efad7c757e5ea947b Mon Sep 17 00:00:00 2001 From: danswick Date: Fri, 13 Mar 2015 17:13:43 -0500 Subject: [PATCH 15/18] Add GA :post_office: :new_moon_with_face: --- about/index.html | 11 +++++++++++ index.html | 10 ++++++++++ user-portal/index.html | 14 ++++++++++++-- webpage/index.html | 10 ++++++++++ webpage/js/user.js | 2 +- 5 files changed, 44 insertions(+), 3 deletions(-) diff --git a/about/index.html b/about/index.html index 4b9a647..b0db759 100644 --- a/about/index.html +++ b/about/index.html @@ -70,5 +70,16 @@

Helping you make smarter decisions about energy use.

+ + + diff --git a/index.html b/index.html index 3336a4d..dbb86bf 100644 --- a/index.html +++ b/index.html @@ -67,5 +67,15 @@

Questions?

+ + \ No newline at end of file diff --git a/user-portal/index.html b/user-portal/index.html index e6e6035..a2f077b 100644 --- a/user-portal/index.html +++ b/user-portal/index.html @@ -73,7 +73,17 @@

Helping you make smarter decisions about energy use.

1-312-487-1087 - hello@deltalumin.com

- - + + + + diff --git a/webpage/index.html b/webpage/index.html index 9fa7cf5..5333d04 100644 --- a/webpage/index.html +++ b/webpage/index.html @@ -136,6 +136,16 @@ --> + + diff --git a/webpage/js/user.js b/webpage/js/user.js index 79255e2..bbf6842 100644 --- a/webpage/js/user.js +++ b/webpage/js/user.js @@ -6,7 +6,7 @@ Tabletop.init( { callback: showInfo, debug: true, parseNumbers: true, - simpleSheet: true + simpleSheet: true } ); function showInfo(data, tabletop){ From a098c39e8b4cc882c6dd81d3e018748342ea36bf Mon Sep 17 00:00:00 2001 From: danswick Date: Fri, 13 Mar 2015 17:24:51 -0500 Subject: [PATCH 16/18] fixed GA tracking code :watch: --- about/index.html | 3 ++- index.html | 3 ++- user-portal/index.html | 3 ++- webpage/index.html | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/about/index.html b/about/index.html index b0db759..648ce93 100644 --- a/about/index.html +++ b/about/index.html @@ -76,8 +76,9 @@

Helping you make smarter decisions about energy use.

m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - ga('create', 'UA-19653615-1', 'auto'); + ga('create', 'UA-19653615-3', 'auto'); ga('send', 'pageview'); + diff --git a/index.html b/index.html index dbb86bf..50de9ed 100644 --- a/index.html +++ b/index.html @@ -73,8 +73,9 @@

Questions?

m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - ga('create', 'UA-19653615-1', 'auto'); + ga('create', 'UA-19653615-3', 'auto'); ga('send', 'pageview'); + diff --git a/user-portal/index.html b/user-portal/index.html index a2f077b..ae05c66 100644 --- a/user-portal/index.html +++ b/user-portal/index.html @@ -81,8 +81,9 @@

Helping you make smarter decisions about energy use.

m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - ga('create', 'UA-19653615-1', 'auto'); + ga('create', 'UA-19653615-3', 'auto'); ga('send', 'pageview'); + diff --git a/webpage/index.html b/webpage/index.html index 5333d04..64e371e 100644 --- a/webpage/index.html +++ b/webpage/index.html @@ -142,8 +142,9 @@ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - ga('create', 'UA-19653615-1', 'auto'); + ga('create', 'UA-19653615-3', 'auto'); ga('send', 'pageview'); + From b999ac11d8386756d1545749dab438b530895e8e Mon Sep 17 00:00:00 2001 From: danswick Date: Tue, 17 Mar 2015 16:01:01 -0500 Subject: [PATCH 17/18] changed 'URL' global var to allow SVG crowbar --- webpage/js/user.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webpage/js/user.js b/webpage/js/user.js index bbf6842..33fe76e 100644 --- a/webpage/js/user.js +++ b/webpage/js/user.js @@ -1,8 +1,8 @@ // Load the data with Tabletop, the app is in the showInfo callback -var URL = '1kL43OgvgJVpEdylU2mX-kPUwHpyCPBCITgP-mLWVRx0'; +var sheetsURL = '1kL43OgvgJVpEdylU2mX-kPUwHpyCPBCITgP-mLWVRx0'; Tabletop.init( { - key: URL, + key: sheetsURL, callback: showInfo, debug: true, parseNumbers: true, @@ -192,6 +192,7 @@ function createPieChart(jsonFile, label, money) { } var svg = d3.select("#pieChart").append("svg") + .attr("class", "pie-chart") .attr("width", cDim.width) .attr("height", cDim.height) .append("g") @@ -1026,6 +1027,7 @@ var calDim = { $("#calendarChart").css("height", (calDim.boxHeight+calDim.boxPadding)*7+calDim.boxHeight/2+"px"); ; var calendarSVG = d3.select("#calendarChart").append("svg") + .attr("class", "calendar-chart") .attr("width", vizWidth) .attr("height", $("#calendarChart").css("height")); From 45b1e2b82e575f79029695013bc67906d554c48f Mon Sep 17 00:00:00 2001 From: danswick Date: Tue, 17 Mar 2015 16:07:48 -0500 Subject: [PATCH 18/18] add userID to svg class --- webpage/js/user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webpage/js/user.js b/webpage/js/user.js index 33fe76e..a7cc4da 100644 --- a/webpage/js/user.js +++ b/webpage/js/user.js @@ -192,7 +192,7 @@ function createPieChart(jsonFile, label, money) { } var svg = d3.select("#pieChart").append("svg") - .attr("class", "pie-chart") + .attr("class", "pie-chart" + ( userID + 1 )) .attr("width", cDim.width) .attr("height", cDim.height) .append("g") @@ -1027,7 +1027,7 @@ var calDim = { $("#calendarChart").css("height", (calDim.boxHeight+calDim.boxPadding)*7+calDim.boxHeight/2+"px"); ; var calendarSVG = d3.select("#calendarChart").append("svg") - .attr("class", "calendar-chart") + .attr("class", "calendar-chart" + (userID + 1)) .attr("width", vizWidth) .attr("height", $("#calendarChart").css("height"));