{"action":"created","comment":{"url":"https://api.github.com/repos/lukad03/spri-nmoda/pulls/comments/42333940","id":42333940,"diff_hunk":"@@ -0,0 +1,125 @@\n+var spriNmoda = spriNmoda || {};\n+\n+spriNmoda.verticalGroupedBarChart = {\n+\n+  drawChart: function(chart) {\n+    var $chart = $(chart),\n+        data = $chart.data(\"chartDataTest\"),\n+        legendLabels = $chart.data(\"chartLabels\"),\n+        groupedData = [];\n+\n+    $.each(legendLabels, function(i){\n+      var labelLength = legendLabels.length,\n+          dataLength = data.length;\n+\n+      var dataRange = data.slice(i, dataLength),\n+          newData = [];\n+\n+      for (var index = 0; index < dataRange.length ; index += labelLength) {\n+        newData.push(dataRange[index]);\n+      }\n+\n+      groupedData.push(newData);\n+    });\n+\n+    var margin = {top: 30, right: 0, bottom: (legendLabels.length * 25), left: 50},\n+        height = 400,\n+        transformedHeight = height - margin.top - margin.right,\n+        width = parseInt(d3.select(chart).style(\"width\"), 10),\n+        width = width - margin.left - margin.right;\n+\n+    var x0 = d3.scale.ordinal()\n+        .rangeRoundBands([0, width], 0.1);\n+\n+    var x1 = d3.scale.ordinal();\n+\n+    var y = d3.scale.linear()\n+        .range([transformedHeight, 0]);\n+\n+    var xAxis = d3.svg.axis()\n+        .scale(x0)\n+        .orient(\"bottom\");\n+\n+    var yAxis = d3.svg.axis()\n+        .scale(y)\n+        .orient(\"left\")\n+        .tickFormat(d3.format(\".2s\"));\n+\n+    var groupDataTest = d3.keys(data);\n+\n+\n+    var svg = d3.select(chart)","path":"app/assets/javascripts/vertical_grouped_bar_chart.js","position":51,"original_position":51,"commit_id":"487dcfba15a1ff9dff0666274b2d6474075a2960","original_commit_id":"487dcfba15a1ff9dff0666274b2d6474075a2960","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"'d3' is not defined.","created_at":"2015-10-19T03:14:32Z","updated_at":"2015-10-19T03:14:32Z","html_url":"https://github.com/lukad03/spri-nmoda/pull/30#discussion_r42333940","pull_request_url":"https://api.github.com/repos/lukad03/spri-nmoda/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/lukad03/spri-nmoda/pulls/comments/42333940"},"html":{"href":"https://github.com/lukad03/spri-nmoda/pull/30#discussion_r42333940"},"pull_request":{"href":"https://api.github.com/repos/lukad03/spri-nmoda/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/lukad03/spri-nmoda/pulls/30","id":48027718,"html_url":"https://github.com/lukad03/spri-nmoda/pull/30","diff_url":"https://github.com/lukad03/spri-nmoda/pull/30.diff","patch_url":"https://github.com/lukad03/spri-nmoda/pull/30.patch","issue_url":"https://api.github.com/repos/lukad03/spri-nmoda/issues/30","number":30,"state":"open","locked":false,"title":"Vertical Grouped Bar Chart","user":{"login":"lukad03","id":2506817,"avatar_url":"https://avatars.githubusercontent.com/u/2506817?v=3","gravatar_id":"","url":"https://api.github.com/users/lukad03","html_url":"https://github.com/lukad03","followers_url":"https://api.github.com/users/lukad03/followers","following_url":"https://api.github.com/users/lukad03/following{/other_user}","gists_url":"https://api.github.com/users/lukad03/gists{/gist_id}","starred_url":"https://api.github.com/users/lukad03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukad03/subscriptions","organizations_url":"https://api.github.com/users/lukad03/orgs","repos_url":"https://api.github.com/users/lukad03/repos","events_url":"https://api.github.com/users/lukad03/events{/privacy}","received_events_url":"https://api.github.com/users/lukad03/received_events","type":"User","site_admin":false},"body":"This commit enables grouped bar charts along the X axis to be rendered.\r\n\r\n* Add Vertical Grouped Bar Chart JS and Styles","created_at":"2015-10-19T03:14:19Z","updated_at":"2015-10-19T03:14:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d93347f9493f2b1083347390beec5f40fa63447f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lukad03/spri-nmoda/pulls/30/commits","review_comments_url":"https://api.github.com/repos/lukad03/spri-nmoda/pulls/30/comments","review_comment_url":"https://api.github.com/repos/lukad03/spri-nmoda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lukad03/spri-nmoda/issues/30/comments","statuses_url":"https://api.github.com/repos/lukad03/spri-nmoda/statuses/487dcfba15a1ff9dff0666274b2d6474075a2960","head":{"label":"lukad03:lk-vertical-grouped-bar-chart","ref":"lk-vertical-grouped-bar-chart","sha":"487dcfba15a1ff9dff0666274b2d6474075a2960","user":{"login":"lukad03","id":2506817,"avatar_url":"https://avatars.githubusercontent.com/u/2506817?v=3","gravatar_id":"","url":"https://api.github.com/users/lukad03","html_url":"https://github.com/lukad03","followers_url":"https://api.github.com/users/lukad03/followers","following_url":"https://api.github.com/users/lukad03/following{/other_user}","gists_url":"https://api.github.com/users/lukad03/gists{/gist_id}","starred_url":"https://api.github.com/users/lukad03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukad03/subscriptions","organizations_url":"https://api.github.com/users/lukad03/orgs","repos_url":"https://api.github.com/users/lukad03/repos","events_url":"https://api.github.com/users/lukad03/events{/privacy}","received_events_url":"https://api.github.com/users/lukad03/received_events","type":"User","site_admin":false},"repo":{"id":41441021,"name":"spri-nmoda","full_name":"lukad03/spri-nmoda","owner":{"login":"lukad03","id":2506817,"avatar_url":"https://avatars.githubusercontent.com/u/2506817?v=3","gravatar_id":"","url":"https://api.github.com/users/lukad03","html_url":"https://github.com/lukad03","followers_url":"https://api.github.com/users/lukad03/followers","following_url":"https://api.github.com/users/lukad03/following{/other_user}","gists_url":"https://api.github.com/users/lukad03/gists{/gist_id}","starred_url":"https://api.github.com/users/lukad03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukad03/subscriptions","organizations_url":"https://api.github.com/users/lukad03/orgs","repos_url":"https://api.github.com/users/lukad03/repos","events_url":"https://api.github.com/users/lukad03/events{/privacy}","received_events_url":"https://api.github.com/users/lukad03/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lukad03/spri-nmoda","description":"","fork":false,"url":"https://api.github.com/repos/lukad03/spri-nmoda","forks_url":"https://api.github.com/repos/lukad03/spri-nmoda/forks","keys_url":"https://api.github.com/repos/lukad03/spri-nmoda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lukad03/spri-nmoda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lukad03/spri-nmoda/teams","hooks_url":"https://api.github.com/repos/lukad03/spri-nmoda/hooks","issue_events_url":"https://api.github.com/repos/lukad03/spri-nmoda/issues/events{/number}","events_url":"https://api.github.com/repos/lukad03/spri-nmoda/events","assignees_url":"https://api.github.com/repos/lukad03/spri-nmoda/assignees{/user}","branches_url":"https://api.github.com/repos/lukad03/spri-nmoda/branches{/branch}","tags_url":"https://api.github.com/repos/lukad03/spri-nmoda/tags","blobs_url":"https://api.github.com/repos/lukad03/spri-nmoda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lukad03/spri-nmoda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lukad03/spri-nmoda/git/refs{/sha}","trees_url":"https://api.github.com/repos/lukad03/spri-nmoda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lukad03/spri-nmoda/statuses/{sha}","languages_url":"https://api.github.com/repos/lukad03/spri-nmoda/languages","stargazers_url":"https://api.github.com/repos/lukad03/spri-nmoda/stargazers","contributors_url":"https://api.github.com/repos/lukad03/spri-nmoda/contributors","subscribers_url":"https://api.github.com/repos/lukad03/spri-nmoda/subscribers","subscription_url":"https://api.github.com/repos/lukad03/spri-nmoda/subscription","commits_url":"https://api.github.com/repos/lukad03/spri-nmoda/commits{/sha}","git_commits_url":"https://api.github.com/repos/lukad03/spri-nmoda/git/commits{/sha}","comments_url":"https://api.github.com/repos/lukad03/spri-nmoda/comments{/number}","issue_comment_url":"https://api.github.com/repos/lukad03/spri-nmoda/issues/comments{/number}","contents_url":"https://api.github.com/repos/lukad03/spri-nmoda/contents/{+path}","compare_url":"https://api.github.com/repos/lukad03/spri-nmoda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lukad03/spri-nmoda/merges","archive_url":"https://api.github.com/repos/lukad03/spri-nmoda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lukad03/spri-nmoda/downloads","issues_url":"https://api.github.com/repos/lukad03/spri-nmoda/issues{/number}","pulls_url":"https://api.github.com/repos/lukad03/spri-nmoda/pulls{/number}","milestones_url":"https://api.github.com/repos/lukad03/spri-nmoda/milestones{/number}","notifications_url":"https://api.github.com/repos/lukad03/spri-nmoda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lukad03/spri-nmoda/labels{/name}","releases_url":"https://api.github.com/repos/lukad03/spri-nmoda/releases{/id}","created_at":"2015-08-26T17:53:30Z","updated_at":"2015-09-25T00:40:35Z","pushed_at":"2015-10-19T03:14:19Z","git_url":"git://github.com/lukad03/spri-nmoda.git","ssh_url":"git@github.com:lukad03/spri-nmoda.git","clone_url":"https://github.com/lukad03/spri-nmoda.git","svn_url":"https://github.com/lukad03/spri-nmoda","homepage":null,"size":560,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"lukad03:master","ref":"master","sha":"260a25945b3eb515c5d3e1ea872937b06b2bd8ba","user":{"login":"lukad03","id":2506817,"avatar_url":"https://avatars.githubusercontent.com/u/2506817?v=3","gravatar_id":"","url":"https://api.github.com/users/lukad03","html_url":"https://github.com/lukad03","followers_url":"https://api.github.com/users/lukad03/followers","following_url":"https://api.github.com/users/lukad03/following{/other_user}","gists_url":"https://api.github.com/users/lukad03/gists{/gist_id}","starred_url":"https://api.github.com/users/lukad03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukad03/subscriptions","organizations_url":"https://api.github.com/users/lukad03/orgs","repos_url":"https://api.github.com/users/lukad03/repos","events_url":"https://api.github.com/users/lukad03/events{/privacy}","received_events_url":"https://api.github.com/users/lukad03/received_events","type":"User","site_admin":false},"repo":{"id":41441021,"name":"spri-nmoda","full_name":"lukad03/spri-nmoda","owner":{"login":"lukad03","id":2506817,"avatar_url":"https://avatars.githubusercontent.com/u/2506817?v=3","gravatar_id":"","url":"https://api.github.com/users/lukad03","html_url":"https://github.com/lukad03","followers_url":"https://api.github.com/users/lukad03/followers","following_url":"https://api.github.com/users/lukad03/following{/other_user}","gists_url":"https://api.github.com/users/lukad03/gists{/gist_id}","starred_url":"https://api.github.com/users/lukad03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukad03/subscriptions","organizations_url":"https://api.github.com/users/lukad03/orgs","repos_url":"https://api.github.com/users/lukad03/repos","events_url":"https://api.github.com/users/lukad03/events{/privacy}","received_events_url":"https://api.github.com/users/lukad03/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lukad03/spri-nmoda","description":"","fork":false,"url":"https://api.github.com/repos/lukad03/spri-nmoda","forks_url":"https://api.github.com/repos/lukad03/spri-nmoda/forks","keys_url":"https://api.github.com/repos/lukad03/spri-nmoda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lukad03/spri-nmoda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lukad03/spri-nmoda/teams","hooks_url":"https://api.github.com/repos/lukad03/spri-nmoda/hooks","issue_events_url":"https://api.github.com/repos/lukad03/spri-nmoda/issues/events{/number}","events_url":"https://api.github.com/repos/lukad03/spri-nmoda/events","assignees_url":"https://api.github.com/repos/lukad03/spri-nmoda/assignees{/user}","branches_url":"https://api.github.com/repos/lukad03/spri-nmoda/branches{/branch}","tags_url":"https://api.github.com/repos/lukad03/spri-nmoda/tags","blobs_url":"https://api.github.com/repos/lukad03/spri-nmoda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lukad03/spri-nmoda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lukad03/spri-nmoda/git/refs{/sha}","trees_url":"https://api.github.com/repos/lukad03/spri-nmoda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lukad03/spri-nmoda/statuses/{sha}","languages_url":"https://api.github.com/repos/lukad03/spri-nmoda/languages","stargazers_url":"https://api.github.com/repos/lukad03/spri-nmoda/stargazers","contributors_url":"https://api.github.com/repos/lukad03/spri-nmoda/contributors","subscribers_url":"https://api.github.com/repos/lukad03/spri-nmoda/subscribers","subscription_url":"https://api.github.com/repos/lukad03/spri-nmoda/subscription","commits_url":"https://api.github.com/repos/lukad03/spri-nmoda/commits{/sha}","git_commits_url":"https://api.github.com/repos/lukad03/spri-nmoda/git/commits{/sha}","comments_url":"https://api.github.com/repos/lukad03/spri-nmoda/comments{/number}","issue_comment_url":"https://api.github.com/repos/lukad03/spri-nmoda/issues/comments{/number}","contents_url":"https://api.github.com/repos/lukad03/spri-nmoda/contents/{+path}","compare_url":"https://api.github.com/repos/lukad03/spri-nmoda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lukad03/spri-nmoda/merges","archive_url":"https://api.github.com/repos/lukad03/spri-nmoda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lukad03/spri-nmoda/downloads","issues_url":"https://api.github.com/repos/lukad03/spri-nmoda/issues{/number}","pulls_url":"https://api.github.com/repos/lukad03/spri-nmoda/pulls{/number}","milestones_url":"https://api.github.com/repos/lukad03/spri-nmoda/milestones{/number}","notifications_url":"https://api.github.com/repos/lukad03/spri-nmoda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lukad03/spri-nmoda/labels{/name}","releases_url":"https://api.github.com/repos/lukad03/spri-nmoda/releases{/id}","created_at":"2015-08-26T17:53:30Z","updated_at":"2015-09-25T00:40:35Z","pushed_at":"2015-10-19T03:14:19Z","git_url":"git://github.com/lukad03/spri-nmoda.git","ssh_url":"git@github.com:lukad03/spri-nmoda.git","clone_url":"https://github.com/lukad03/spri-nmoda.git","svn_url":"https://github.com/lukad03/spri-nmoda","homepage":null,"size":560,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lukad03/spri-nmoda/pulls/30"},"html":{"href":"https://github.com/lukad03/spri-nmoda/pull/30"},"issue":{"href":"https://api.github.com/repos/lukad03/spri-nmoda/issues/30"},"comments":{"href":"https://api.github.com/repos/lukad03/spri-nmoda/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/lukad03/spri-nmoda/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/lukad03/spri-nmoda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lukad03/spri-nmoda/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/lukad03/spri-nmoda/statuses/487dcfba15a1ff9dff0666274b2d6474075a2960"}}}}