{"action":"created","comment":{"url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/pulls/comments/34981318","id":34981318,"diff_hunk":"@@ -0,0 +1,83 @@\n+(function(fcsc, fc, d3) {\n+    'use strict';\n+    fcsc.chartFramework = function() {\n+        var width = 500;\n+        var height = 300;\n+        var timeSeries = fc.chart.linearTimeSeries();\n+        var multi = fc.series.multi();\n+        var plugins = [];\n+        var dateScale = fc.scale.dateTime()\n+            .range([0, width]);\n+        var scaleExtent = [];\n+\n+        function chart(selection) {\n+            selection.each(function(d, i) {\n+                scaleExtent = fc.util.extent(d, ['date']);\n+\n+                // Y-axis automatically scales\n+                timeSeries.xDomain(dateScale.domain())\n+                    .yDomain(fc.util.extent(d, ['open', 'close']));\n+\n+                timeSeries.plotArea(multi);\n+                selection.call(timeSeries);\n+\n+                for (var j = 0; j < plugins.length; j++) {\n+                    selection.call(plugins[j], chart);\n+                }\n+            });\n+            return chart;\n+        }\n+\n+        chart.scaleExtent = function(value) {\n+            if (!arguments.length) { return scaleExtent; }\n+            scaleExtent = value;\n+            return chart;\n+        };\n+\n+        chart.dateScale = function(value) {\n+            if (!arguments.length) { return dateScale; }\n+            dateScale = value;\n+            return chart;\n+        };\n+\n+        // Perhaps this should be done using d3.rebind\n+        chart.initDomain = function(value) {\n+            if (!arguments.length) { return dateScale.domain(); }\n+            dateScale.domain(value);\n+            return chart;\n+        };\n+\n+        chart.width = function(value) {\n+            if (!arguments.length) { return width; }\n+            width = value;\n+            dateScale.range([0, width]);\n+            return chart;\n+        };\n+\n+        chart.height = function(value) {\n+            if (!arguments.length) { return height; }\n+            height = value;\n+            return chart;\n+        };\n+\n+        chart.plugins = function(value) {\n+            if (!arguments.length) { return plugins; }\n+            plugins = value;\n+            return chart;\n+        };\n+\n+        d3.rebind(chart, multi, 'series');\n+\n+        chart.getVisibleData = function(data, dateExtent) { // currently unused","path":"src/assets/js/chartFramework.js","position":71,"original_position":71,"commit_id":"1d04409e69704c0600c11ede5033ee3c2035254e","original_commit_id":"1d04409e69704c0600c11ede5033ee3c2035254e","user":{"login":"jleft","id":2017615,"avatar_url":"https://avatars.githubusercontent.com/u/2017615?v=3","gravatar_id":"","url":"https://api.github.com/users/jleft","html_url":"https://github.com/jleft","followers_url":"https://api.github.com/users/jleft/followers","following_url":"https://api.github.com/users/jleft/following{/other_user}","gists_url":"https://api.github.com/users/jleft/gists{/gist_id}","starred_url":"https://api.github.com/users/jleft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleft/subscriptions","organizations_url":"https://api.github.com/users/jleft/orgs","repos_url":"https://api.github.com/users/jleft/repos","events_url":"https://api.github.com/users/jleft/events{/privacy}","received_events_url":"https://api.github.com/users/jleft/received_events","type":"User","site_admin":false},"body":"If this is unused, shall we remove it and add it back in later?","created_at":"2015-07-20T10:01:58Z","updated_at":"2015-07-20T10:01:58Z","html_url":"https://github.com/ScottLogic/d3fc-showcase/pull/18#discussion_r34981318","pull_request_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/ScottLogic/d3fc-showcase/pulls/comments/34981318"},"html":{"href":"https://github.com/ScottLogic/d3fc-showcase/pull/18#discussion_r34981318"},"pull_request":{"href":"https://api.github.com/repos/ScottLogic/d3fc-showcase/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/pulls/18","id":40238361,"html_url":"https://github.com/ScottLogic/d3fc-showcase/pull/18","diff_url":"https://github.com/ScottLogic/d3fc-showcase/pull/18.diff","patch_url":"https://github.com/ScottLogic/d3fc-showcase/pull/18.patch","issue_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/issues/18","number":18,"state":"open","locked":false,"title":"Added zoom plugin","user":{"login":"CBarrett2","id":12998688,"avatar_url":"https://avatars.githubusercontent.com/u/12998688?v=3","gravatar_id":"","url":"https://api.github.com/users/CBarrett2","html_url":"https://github.com/CBarrett2","followers_url":"https://api.github.com/users/CBarrett2/followers","following_url":"https://api.github.com/users/CBarrett2/following{/other_user}","gists_url":"https://api.github.com/users/CBarrett2/gists{/gist_id}","starred_url":"https://api.github.com/users/CBarrett2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CBarrett2/subscriptions","organizations_url":"https://api.github.com/users/CBarrett2/orgs","repos_url":"https://api.github.com/users/CBarrett2/repos","events_url":"https://api.github.com/users/CBarrett2/events{/privacy}","received_events_url":"https://api.github.com/users/CBarrett2/received_events","type":"User","site_admin":false},"body":"zoomPlugin plugin adds zoom and pan functionality - still needs to fix scaleExtent, so you don't zoom off the chart. ","created_at":"2015-07-17T14:48:36Z","updated_at":"2015-07-20T10:01:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f8c15d4803c27c76770afb3f54a04988a5caf10","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/pulls/18/commits","review_comments_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/pulls/18/comments","review_comment_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/issues/18/comments","statuses_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/statuses/1d04409e69704c0600c11ede5033ee3c2035254e","head":{"label":"CBarrett2:feature/pan","ref":"feature/pan","sha":"1d04409e69704c0600c11ede5033ee3c2035254e","user":{"login":"CBarrett2","id":12998688,"avatar_url":"https://avatars.githubusercontent.com/u/12998688?v=3","gravatar_id":"","url":"https://api.github.com/users/CBarrett2","html_url":"https://github.com/CBarrett2","followers_url":"https://api.github.com/users/CBarrett2/followers","following_url":"https://api.github.com/users/CBarrett2/following{/other_user}","gists_url":"https://api.github.com/users/CBarrett2/gists{/gist_id}","starred_url":"https://api.github.com/users/CBarrett2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CBarrett2/subscriptions","organizations_url":"https://api.github.com/users/CBarrett2/orgs","repos_url":"https://api.github.com/users/CBarrett2/repos","events_url":"https://api.github.com/users/CBarrett2/events{/privacy}","received_events_url":"https://api.github.com/users/CBarrett2/received_events","type":"User","site_admin":false},"repo":{"id":39068757,"name":"d3fc-showcase","full_name":"CBarrett2/d3fc-showcase","owner":{"login":"CBarrett2","id":12998688,"avatar_url":"https://avatars.githubusercontent.com/u/12998688?v=3","gravatar_id":"","url":"https://api.github.com/users/CBarrett2","html_url":"https://github.com/CBarrett2","followers_url":"https://api.github.com/users/CBarrett2/followers","following_url":"https://api.github.com/users/CBarrett2/following{/other_user}","gists_url":"https://api.github.com/users/CBarrett2/gists{/gist_id}","starred_url":"https://api.github.com/users/CBarrett2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CBarrett2/subscriptions","organizations_url":"https://api.github.com/users/CBarrett2/orgs","repos_url":"https://api.github.com/users/CBarrett2/repos","events_url":"https://api.github.com/users/CBarrett2/events{/privacy}","received_events_url":"https://api.github.com/users/CBarrett2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CBarrett2/d3fc-showcase","description":"My clone of the development branch","fork":true,"url":"https://api.github.com/repos/CBarrett2/d3fc-showcase","forks_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/forks","keys_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/teams","hooks_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/hooks","issue_events_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/issues/events{/number}","events_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/events","assignees_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/assignees{/user}","branches_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/branches{/branch}","tags_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/tags","blobs_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/git/refs{/sha}","trees_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/statuses/{sha}","languages_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/languages","stargazers_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/stargazers","contributors_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/contributors","subscribers_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/subscribers","subscription_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/subscription","commits_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/commits{/sha}","git_commits_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/git/commits{/sha}","comments_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/comments{/number}","issue_comment_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/issues/comments{/number}","contents_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/contents/{+path}","compare_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/merges","archive_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/downloads","issues_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/issues{/number}","pulls_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/pulls{/number}","milestones_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/milestones{/number}","notifications_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/labels{/name}","releases_url":"https://api.github.com/repos/CBarrett2/d3fc-showcase/releases{/id}","created_at":"2015-07-14T10:32:06Z","updated_at":"2015-07-14T10:32:21Z","pushed_at":"2015-07-17T14:47:19Z","git_url":"git://github.com/CBarrett2/d3fc-showcase.git","ssh_url":"git@github.com:CBarrett2/d3fc-showcase.git","clone_url":"https://github.com/CBarrett2/d3fc-showcase.git","svn_url":"https://github.com/CBarrett2/d3fc-showcase","homepage":"","size":119,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ScottLogic:develop","ref":"develop","sha":"7f4d6d4bd5a7fb6a40abbda5780601dfa83b03a0","user":{"login":"ScottLogic","id":2046037,"avatar_url":"https://avatars.githubusercontent.com/u/2046037?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottLogic","html_url":"https://github.com/ScottLogic","followers_url":"https://api.github.com/users/ScottLogic/followers","following_url":"https://api.github.com/users/ScottLogic/following{/other_user}","gists_url":"https://api.github.com/users/ScottLogic/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottLogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottLogic/subscriptions","organizations_url":"https://api.github.com/users/ScottLogic/orgs","repos_url":"https://api.github.com/users/ScottLogic/repos","events_url":"https://api.github.com/users/ScottLogic/events{/privacy}","received_events_url":"https://api.github.com/users/ScottLogic/received_events","type":"Organization","site_admin":false},"repo":{"id":39064095,"name":"d3fc-showcase","full_name":"ScottLogic/d3fc-showcase","owner":{"login":"ScottLogic","id":2046037,"avatar_url":"https://avatars.githubusercontent.com/u/2046037?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottLogic","html_url":"https://github.com/ScottLogic","followers_url":"https://api.github.com/users/ScottLogic/followers","following_url":"https://api.github.com/users/ScottLogic/following{/other_user}","gists_url":"https://api.github.com/users/ScottLogic/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottLogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottLogic/subscriptions","organizations_url":"https://api.github.com/users/ScottLogic/orgs","repos_url":"https://api.github.com/users/ScottLogic/repos","events_url":"https://api.github.com/users/ScottLogic/events{/privacy}","received_events_url":"https://api.github.com/users/ScottLogic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ScottLogic/d3fc-showcase","description":"A cross-platform financial charting application to showcase the functionality of d3fc components.","fork":false,"url":"https://api.github.com/repos/ScottLogic/d3fc-showcase","forks_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/forks","keys_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/teams","hooks_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/hooks","issue_events_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/issues/events{/number}","events_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/events","assignees_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/assignees{/user}","branches_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/branches{/branch}","tags_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/tags","blobs_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/git/refs{/sha}","trees_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/statuses/{sha}","languages_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/languages","stargazers_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/stargazers","contributors_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/contributors","subscribers_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/subscribers","subscription_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/subscription","commits_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/commits{/sha}","git_commits_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/git/commits{/sha}","comments_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/comments{/number}","issue_comment_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/issues/comments{/number}","contents_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/contents/{+path}","compare_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/merges","archive_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/downloads","issues_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/issues{/number}","pulls_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/pulls{/number}","milestones_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/milestones{/number}","notifications_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/labels{/name}","releases_url":"https://api.github.com/repos/ScottLogic/d3fc-showcase/releases{/id}","created_at":"2015-07-14T08:47:46Z","updated_at":"2015-07-20T07:45:52Z","pushed_at":"2015-07-17T16:10:15Z","git_url":"git://github.com/ScottLogic/d3fc-showcase.git","ssh_url":"git@github.com:ScottLogic/d3fc-showcase.git","clone_url":"https://github.com/ScottLogic/d3fc-showcase.git","svn_url":"https://github.com/ScottLogic/d3fc-showcase","homepage":"","size":247,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ScottLogic/d3fc-showcase/pulls/18"},"html":{"href":"https://github.com/ScottLogic/d3fc-showcase/pull/18"},"issue":{"href":"https://api.github.com/repos/ScottLogic/d3fc-showcase/issues/18"},"comments":{"href":"https://api.github.com/repos/ScottLogic/d3fc-showcase/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/ScottLogic/d3fc-showcase/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/ScottLogic/d3fc-showcase/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ScottLogic/d3fc-showcase/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/ScottLogic/d3fc-showcase/statuses/1d04409e69704c0600c11ede5033ee3c2035254e"}}}}