{"action":"created","comment":{"url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/comments/39981613","id":39981613,"diff_hunk":"@@ -2,142 +2,168 @@\n  * Created by nicolas on 8/7/15.\n  */\n \n-$(document)\n-    .ready(function() {\n-\n-\n-        var data = [];\n+function getMean(data, attribute){\n+    return _(data)\n+        .pluck(attribute)\n+        .reduce(function(mean, score){\n+            return (mean + score) / 2\n+        }, data[0][attribute])\n+}\n+\n+function buildParallelCoordinates(data){\n+\n+    data = data.map(function(score){return {\n+        timestamp: score.timestamp,\n+        Documentation: score.docScore,\n+        Maturity: score.maturityScore,\n+        Design: score.designScore,\n+        Support: score.supportScore\n+    }});\n+\n+    var margin = {top: 30, right: 10, bottom: 30, left: 10},\n+        container = $('#scoreChart'),\n+        width = container.parent().width() - margin.left - margin.right,\n+        height = 250 - margin.top - margin.bottom;\n+\n+    var opacity = d3.scale.linear()\n+            .domain(d3.extent(data, function(p) { return +p.timestamp; }))\n+            .range([0.2,1]),\n+        x = d3.scale.ordinal().rangePoints([0, width], 1),\n+        y = {};\n+\n+    var line = d3.svg.line(),\n+        axis = d3.svg.axis().orient(\"left\"),\n+        background,\n+        foreground;\n+\n+    // Returns the path for a given data point.\n+    function path(d) {\n+        return line(dimensions.map(function(p) { return [x(p), y[p](d[p])]; }));\n+    }\n+\n+    // Handles a brush event, toggling the display of foreground lines.\n+    function brush() {\n+        var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),\n+            extents = actives.map(function(p) { return y[p].brush.extent(); });\n+        foreground.style(\"display\", function(d) {\n+            return actives.every(function(p, i) {\n+                return extents[i][0] <= d[p] && d[p] <= extents[i][1];\n+            }) ? null : \"none\";\n+        });\n+    }\n+\n+    var svg = d3.select(\"#scoreChart\").append(\"svg\")\n+        .attr(\"width\", width + margin.left + margin.right)\n+        .attr(\"height\", height + margin.top + margin.bottom)\n+        .append(\"g\")\n+        .attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");\n+\n+    // Extract the list of dimensions and create a scale for each.\n+    x.domain(dimensions = d3.keys(data[0]).filter(function(d) {","path":"public/javascripts/repository.js","position":66,"original_position":66,"commit_id":"dfe03d10944ae983ce267a96be0fd1dc71f0de6d","original_commit_id":"dfe03d10944ae983ce267a96be0fd1dc71f0de6d","user":{"login":"callicles","id":4429209,"avatar_url":"https://avatars.githubusercontent.com/u/4429209?v=3","gravatar_id":"","url":"https://api.github.com/users/callicles","html_url":"https://github.com/callicles","followers_url":"https://api.github.com/users/callicles/followers","following_url":"https://api.github.com/users/callicles/following{/other_user}","gists_url":"https://api.github.com/users/callicles/gists{/gist_id}","starred_url":"https://api.github.com/users/callicles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callicles/subscriptions","organizations_url":"https://api.github.com/users/callicles/orgs","repos_url":"https://api.github.com/users/callicles/repos","events_url":"https://api.github.com/users/callicles/events{/privacy}","received_events_url":"https://api.github.com/users/callicles/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/versioned/images/favicon.png) Issue found: [Variable 'dimensions' implicitly declared.](https://www.codacy.com/app/gitlinks/gitrank-web/file/996075795/issues/source?bid=2432310&fileBranchId=2868924#l62)","created_at":"2015-09-21T15:07:17Z","updated_at":"2015-09-21T15:07:17Z","html_url":"https://github.com/gitlinks/gitrank-web/pull/68#discussion_r39981613","pull_request_url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/68","_links":{"self":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/comments/39981613"},"html":{"href":"https://github.com/gitlinks/gitrank-web/pull/68#discussion_r39981613"},"pull_request":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/68"}}},"pull_request":{"url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/68","id":45434608,"html_url":"https://github.com/gitlinks/gitrank-web/pull/68","diff_url":"https://github.com/gitlinks/gitrank-web/pull/68.diff","patch_url":"https://github.com/gitlinks/gitrank-web/pull/68.patch","issue_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues/68","number":68,"state":"open","locked":false,"title":"Feature/paralle coord","user":{"login":"callicles","id":4429209,"avatar_url":"https://avatars.githubusercontent.com/u/4429209?v=3","gravatar_id":"","url":"https://api.github.com/users/callicles","html_url":"https://github.com/callicles","followers_url":"https://api.github.com/users/callicles/followers","following_url":"https://api.github.com/users/callicles/following{/other_user}","gists_url":"https://api.github.com/users/callicles/gists{/gist_id}","starred_url":"https://api.github.com/users/callicles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callicles/subscriptions","organizations_url":"https://api.github.com/users/callicles/orgs","repos_url":"https://api.github.com/users/callicles/repos","events_url":"https://api.github.com/users/callicles/events{/privacy}","received_events_url":"https://api.github.com/users/callicles/received_events","type":"User","site_admin":false},"body":"Fixes #54 #57 ","created_at":"2015-09-18T18:00:25Z","updated_at":"2015-09-21T15:07:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05c6879500135e4d8cce1bd5117ad946aae33aa8","assignee":{"login":"brunnoattorre","id":5482242,"avatar_url":"https://avatars.githubusercontent.com/u/5482242?v=3","gravatar_id":"","url":"https://api.github.com/users/brunnoattorre","html_url":"https://github.com/brunnoattorre","followers_url":"https://api.github.com/users/brunnoattorre/followers","following_url":"https://api.github.com/users/brunnoattorre/following{/other_user}","gists_url":"https://api.github.com/users/brunnoattorre/gists{/gist_id}","starred_url":"https://api.github.com/users/brunnoattorre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunnoattorre/subscriptions","organizations_url":"https://api.github.com/users/brunnoattorre/orgs","repos_url":"https://api.github.com/users/brunnoattorre/repos","events_url":"https://api.github.com/users/brunnoattorre/events{/privacy}","received_events_url":"https://api.github.com/users/brunnoattorre/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/68/commits","review_comments_url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/68/comments","review_comment_url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues/68/comments","statuses_url":"https://api.github.com/repos/gitlinks/gitrank-web/statuses/dfe03d10944ae983ce267a96be0fd1dc71f0de6d","head":{"label":"gitlinks:feature/paralleCoord","ref":"feature/paralleCoord","sha":"dfe03d10944ae983ce267a96be0fd1dc71f0de6d","user":{"login":"gitlinks","id":12600538,"avatar_url":"https://avatars.githubusercontent.com/u/12600538?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlinks","html_url":"https://github.com/gitlinks","followers_url":"https://api.github.com/users/gitlinks/followers","following_url":"https://api.github.com/users/gitlinks/following{/other_user}","gists_url":"https://api.github.com/users/gitlinks/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlinks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlinks/subscriptions","organizations_url":"https://api.github.com/users/gitlinks/orgs","repos_url":"https://api.github.com/users/gitlinks/repos","events_url":"https://api.github.com/users/gitlinks/events{/privacy}","received_events_url":"https://api.github.com/users/gitlinks/received_events","type":"Organization","site_admin":false},"repo":{"id":36321709,"name":"gitrank-web","full_name":"gitlinks/gitrank-web","owner":{"login":"gitlinks","id":12600538,"avatar_url":"https://avatars.githubusercontent.com/u/12600538?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlinks","html_url":"https://github.com/gitlinks","followers_url":"https://api.github.com/users/gitlinks/followers","following_url":"https://api.github.com/users/gitlinks/following{/other_user}","gists_url":"https://api.github.com/users/gitlinks/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlinks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlinks/subscriptions","organizations_url":"https://api.github.com/users/gitlinks/orgs","repos_url":"https://api.github.com/users/gitlinks/repos","events_url":"https://api.github.com/users/gitlinks/events{/privacy}","received_events_url":"https://api.github.com/users/gitlinks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gitlinks/gitrank-web","description":"Web Play/Scala application delivery gitrank frontend.","fork":false,"url":"https://api.github.com/repos/gitlinks/gitrank-web","forks_url":"https://api.github.com/repos/gitlinks/gitrank-web/forks","keys_url":"https://api.github.com/repos/gitlinks/gitrank-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitlinks/gitrank-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitlinks/gitrank-web/teams","hooks_url":"https://api.github.com/repos/gitlinks/gitrank-web/hooks","issue_events_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues/events{/number}","events_url":"https://api.github.com/repos/gitlinks/gitrank-web/events","assignees_url":"https://api.github.com/repos/gitlinks/gitrank-web/assignees{/user}","branches_url":"https://api.github.com/repos/gitlinks/gitrank-web/branches{/branch}","tags_url":"https://api.github.com/repos/gitlinks/gitrank-web/tags","blobs_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitlinks/gitrank-web/statuses/{sha}","languages_url":"https://api.github.com/repos/gitlinks/gitrank-web/languages","stargazers_url":"https://api.github.com/repos/gitlinks/gitrank-web/stargazers","contributors_url":"https://api.github.com/repos/gitlinks/gitrank-web/contributors","subscribers_url":"https://api.github.com/repos/gitlinks/gitrank-web/subscribers","subscription_url":"https://api.github.com/repos/gitlinks/gitrank-web/subscription","commits_url":"https://api.github.com/repos/gitlinks/gitrank-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitlinks/gitrank-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/gitlinks/gitrank-web/contents/{+path}","compare_url":"https://api.github.com/repos/gitlinks/gitrank-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitlinks/gitrank-web/merges","archive_url":"https://api.github.com/repos/gitlinks/gitrank-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitlinks/gitrank-web/downloads","issues_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues{/number}","pulls_url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls{/number}","milestones_url":"https://api.github.com/repos/gitlinks/gitrank-web/milestones{/number}","notifications_url":"https://api.github.com/repos/gitlinks/gitrank-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitlinks/gitrank-web/labels{/name}","releases_url":"https://api.github.com/repos/gitlinks/gitrank-web/releases{/id}","created_at":"2015-05-26T20:25:21Z","updated_at":"2015-08-05T11:50:36Z","pushed_at":"2015-09-21T15:05:14Z","git_url":"git://github.com/gitlinks/gitrank-web.git","ssh_url":"git@github.com:gitlinks/gitrank-web.git","clone_url":"https://github.com/gitlinks/gitrank-web.git","svn_url":"https://github.com/gitlinks/gitrank-web","homepage":null,"size":2607,"stargazers_count":4,"watchers_count":4,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":27,"forks":2,"open_issues":27,"watchers":4,"default_branch":"master"}},"base":{"label":"gitlinks:develop","ref":"develop","sha":"a866c0742a73db8f81d6531764b495f41499a4e4","user":{"login":"gitlinks","id":12600538,"avatar_url":"https://avatars.githubusercontent.com/u/12600538?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlinks","html_url":"https://github.com/gitlinks","followers_url":"https://api.github.com/users/gitlinks/followers","following_url":"https://api.github.com/users/gitlinks/following{/other_user}","gists_url":"https://api.github.com/users/gitlinks/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlinks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlinks/subscriptions","organizations_url":"https://api.github.com/users/gitlinks/orgs","repos_url":"https://api.github.com/users/gitlinks/repos","events_url":"https://api.github.com/users/gitlinks/events{/privacy}","received_events_url":"https://api.github.com/users/gitlinks/received_events","type":"Organization","site_admin":false},"repo":{"id":36321709,"name":"gitrank-web","full_name":"gitlinks/gitrank-web","owner":{"login":"gitlinks","id":12600538,"avatar_url":"https://avatars.githubusercontent.com/u/12600538?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlinks","html_url":"https://github.com/gitlinks","followers_url":"https://api.github.com/users/gitlinks/followers","following_url":"https://api.github.com/users/gitlinks/following{/other_user}","gists_url":"https://api.github.com/users/gitlinks/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlinks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlinks/subscriptions","organizations_url":"https://api.github.com/users/gitlinks/orgs","repos_url":"https://api.github.com/users/gitlinks/repos","events_url":"https://api.github.com/users/gitlinks/events{/privacy}","received_events_url":"https://api.github.com/users/gitlinks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gitlinks/gitrank-web","description":"Web Play/Scala application delivery gitrank frontend.","fork":false,"url":"https://api.github.com/repos/gitlinks/gitrank-web","forks_url":"https://api.github.com/repos/gitlinks/gitrank-web/forks","keys_url":"https://api.github.com/repos/gitlinks/gitrank-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitlinks/gitrank-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitlinks/gitrank-web/teams","hooks_url":"https://api.github.com/repos/gitlinks/gitrank-web/hooks","issue_events_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues/events{/number}","events_url":"https://api.github.com/repos/gitlinks/gitrank-web/events","assignees_url":"https://api.github.com/repos/gitlinks/gitrank-web/assignees{/user}","branches_url":"https://api.github.com/repos/gitlinks/gitrank-web/branches{/branch}","tags_url":"https://api.github.com/repos/gitlinks/gitrank-web/tags","blobs_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitlinks/gitrank-web/statuses/{sha}","languages_url":"https://api.github.com/repos/gitlinks/gitrank-web/languages","stargazers_url":"https://api.github.com/repos/gitlinks/gitrank-web/stargazers","contributors_url":"https://api.github.com/repos/gitlinks/gitrank-web/contributors","subscribers_url":"https://api.github.com/repos/gitlinks/gitrank-web/subscribers","subscription_url":"https://api.github.com/repos/gitlinks/gitrank-web/subscription","commits_url":"https://api.github.com/repos/gitlinks/gitrank-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitlinks/gitrank-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitlinks/gitrank-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/gitlinks/gitrank-web/contents/{+path}","compare_url":"https://api.github.com/repos/gitlinks/gitrank-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitlinks/gitrank-web/merges","archive_url":"https://api.github.com/repos/gitlinks/gitrank-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitlinks/gitrank-web/downloads","issues_url":"https://api.github.com/repos/gitlinks/gitrank-web/issues{/number}","pulls_url":"https://api.github.com/repos/gitlinks/gitrank-web/pulls{/number}","milestones_url":"https://api.github.com/repos/gitlinks/gitrank-web/milestones{/number}","notifications_url":"https://api.github.com/repos/gitlinks/gitrank-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitlinks/gitrank-web/labels{/name}","releases_url":"https://api.github.com/repos/gitlinks/gitrank-web/releases{/id}","created_at":"2015-05-26T20:25:21Z","updated_at":"2015-08-05T11:50:36Z","pushed_at":"2015-09-21T15:05:14Z","git_url":"git://github.com/gitlinks/gitrank-web.git","ssh_url":"git@github.com:gitlinks/gitrank-web.git","clone_url":"https://github.com/gitlinks/gitrank-web.git","svn_url":"https://github.com/gitlinks/gitrank-web","homepage":null,"size":2607,"stargazers_count":4,"watchers_count":4,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":27,"forks":2,"open_issues":27,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/68"},"html":{"href":"https://github.com/gitlinks/gitrank-web/pull/68"},"issue":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/issues/68"},"comments":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/gitlinks/gitrank-web/statuses/dfe03d10944ae983ce267a96be0fd1dc71f0de6d"}}}}