{"action":"created","comment":{"url":"https://api.github.com/repos/ScottLogic/d3-financial-components/pulls/comments/23177849","id":23177849,"diff_hunk":"@@ -0,0 +1,104 @@\n+(function(d3, fc) {\n+    'use strict';\n+\n+    var data = fc.utilities.dataGenerator()\n+        .seedDate(new Date(2014, 1, 1))\n+        .randomSeed('12345')\n+        .generate(50);\n+\n+    var chart = d3.select('#annotation'),\n+        chartLayout = fc.utilities.chartLayout();\n+\n+    chart.call(chartLayout);\n+\n+    // Create scale for x axis\n+    var dateScale = fc.scale.dateTime()\n+        .domain(fc.utilities.extent(data, 'date'))\n+        .range([0, chartLayout.getPlotAreaWidth()])\n+        .nice();\n+\n+    // Create scale for y axis\n+    var priceScale = fc.scale.linear()\n+        .domain(fc.utilities.extent(data, ['high', 'low']))\n+        .range([chartLayout.getPlotAreaHeight(), 0])\n+        .nice();\n+\n+    // Create the axes\n+    var dateAxis = d3.svg.axis()\n+        .scale(dateScale)\n+        .orient('bottom')\n+        .ticks(5);\n+\n+    var priceAxis = d3.svg.axis()\n+        .scale(priceScale)\n+        .orient('right')\n+        .ticks(5);\n+\n+    // Add the axes to the chart\n+    chartLayout.getAxisContainer('bottom').call(dateAxis);\n+    chartLayout.getAxisContainer('right').call(priceAxis);\n+\n+    // Create the OHLC series\n+    var ohlc = fc.series.ohlc()\n+        .xScale(dateScale)\n+        .yScale(priceScale);\n+\n+    // Add the primary OHLC series\n+    chartLayout.getPlotArea().append('g')\n+        .attr('class', 'series')\n+        .datum(data)\n+        .call(ohlc);\n+\n+    // Create the annotations\n+    var annotation = fc.tools.annotation()\n+        .xScale(dateScale)\n+        .yScale(priceScale)\n+        .padding(10);\n+\n+    var lastCloseAnnotation = fc.tools.annotation()\n+        .yValue(fc.utilities.valueAccessor('close'))\n+        .xScale(dateScale)\n+        .yScale(priceScale)\n+        .padding(7)\n+        .label(function(d) {\n+            return 'Last close: ' + d3.format('.6f')(d.close);\n+        });\n+\n+    var annotationDecimal = fc.tools.annotation()\n+        .xScale(dateScale)\n+        .yScale(priceScale)\n+        .decorate(function(selection) {\n+            selection.selectAll('line')","path":"visual-tests/test-scripts/tools/annotation.js","position":71,"original_position":71,"commit_id":"eae9250515538eeebc115c1b66c662349121c037","original_commit_id":"eae9250515538eeebc115c1b66c662349121c037","user":{"login":"chrisprice","id":433457,"avatar_url":"https://avatars.githubusercontent.com/u/433457?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisprice","html_url":"https://github.com/chrisprice","followers_url":"https://api.github.com/users/chrisprice/followers","following_url":"https://api.github.com/users/chrisprice/following{/other_user}","gists_url":"https://api.github.com/users/chrisprice/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisprice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisprice/subscriptions","organizations_url":"https://api.github.com/users/chrisprice/orgs","repos_url":"https://api.github.com/users/chrisprice/repos","events_url":"https://api.github.com/users/chrisprice/events{/privacy}","received_events_url":"https://api.github.com/users/chrisprice/received_events","type":"User","site_admin":false},"body":"selectAll?","created_at":"2015-01-19T18:30:51Z","updated_at":"2015-01-19T18:30:51Z","html_url":"https://github.com/ScottLogic/d3-financial-components/pull/256#discussion_r23177849","pull_request_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/pulls/256","_links":{"self":{"href":"https://api.github.com/repos/ScottLogic/d3-financial-components/pulls/comments/23177849"},"html":{"href":"https://github.com/ScottLogic/d3-financial-components/pull/256#discussion_r23177849"},"pull_request":{"href":"https://api.github.com/repos/ScottLogic/d3-financial-components/pulls/256"}}},"pull_request":{"url":"https://api.github.com/repos/ScottLogic/d3-financial-components/pulls/256","id":27601452,"html_url":"https://github.com/ScottLogic/d3-financial-components/pull/256","diff_url":"https://github.com/ScottLogic/d3-financial-components/pull/256.diff","patch_url":"https://github.com/ScottLogic/d3-financial-components/pull/256.patch","issue_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/issues/256","number":256,"state":"open","locked":false,"title":"Update Annotation tool","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":" - Follows general update pattern (resolves #230)\r\n - Follows simplified approach to exposing properties (#232)\r\n - More flexible label formatting with formatLabel (resolves #225)\r\n - Uses simpleDataJoin (#247)\r\n - Decorate added (can be used to override padding - resolves #224)\r\n - ID generation removed and is no longer the responsibility of the component (resolves #223)","created_at":"2015-01-19T11:49:32Z","updated_at":"2015-01-19T18:30:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14f8180a595b96f12fc48d18607d75548e79c157","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/pulls/256/commits","review_comments_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/pulls/256/comments","review_comment_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/issues/256/comments","statuses_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/statuses/eae9250515538eeebc115c1b66c662349121c037","head":{"label":"jleft:annotation-update","ref":"annotation-update","sha":"eae9250515538eeebc115c1b66c662349121c037","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},"repo":{"id":26486736,"name":"d3-financial-components","full_name":"jleft/d3-financial-components","owner":{"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},"private":false,"html_url":"https://github.com/jleft/d3-financial-components","description":"A set of re-useable components for building financial charts with D3","fork":true,"url":"https://api.github.com/repos/jleft/d3-financial-components","forks_url":"https://api.github.com/repos/jleft/d3-financial-components/forks","keys_url":"https://api.github.com/repos/jleft/d3-financial-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jleft/d3-financial-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jleft/d3-financial-components/teams","hooks_url":"https://api.github.com/repos/jleft/d3-financial-components/hooks","issue_events_url":"https://api.github.com/repos/jleft/d3-financial-components/issues/events{/number}","events_url":"https://api.github.com/repos/jleft/d3-financial-components/events","assignees_url":"https://api.github.com/repos/jleft/d3-financial-components/assignees{/user}","branches_url":"https://api.github.com/repos/jleft/d3-financial-components/branches{/branch}","tags_url":"https://api.github.com/repos/jleft/d3-financial-components/tags","blobs_url":"https://api.github.com/repos/jleft/d3-financial-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jleft/d3-financial-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jleft/d3-financial-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/jleft/d3-financial-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jleft/d3-financial-components/statuses/{sha}","languages_url":"https://api.github.com/repos/jleft/d3-financial-components/languages","stargazers_url":"https://api.github.com/repos/jleft/d3-financial-components/stargazers","contributors_url":"https://api.github.com/repos/jleft/d3-financial-components/contributors","subscribers_url":"https://api.github.com/repos/jleft/d3-financial-components/subscribers","subscription_url":"https://api.github.com/repos/jleft/d3-financial-components/subscription","commits_url":"https://api.github.com/repos/jleft/d3-financial-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/jleft/d3-financial-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/jleft/d3-financial-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/jleft/d3-financial-components/issues/comments/{number}","contents_url":"https://api.github.com/repos/jleft/d3-financial-components/contents/{+path}","compare_url":"https://api.github.com/repos/jleft/d3-financial-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jleft/d3-financial-components/merges","archive_url":"https://api.github.com/repos/jleft/d3-financial-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jleft/d3-financial-components/downloads","issues_url":"https://api.github.com/repos/jleft/d3-financial-components/issues{/number}","pulls_url":"https://api.github.com/repos/jleft/d3-financial-components/pulls{/number}","milestones_url":"https://api.github.com/repos/jleft/d3-financial-components/milestones{/number}","notifications_url":"https://api.github.com/repos/jleft/d3-financial-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jleft/d3-financial-components/labels{/name}","releases_url":"https://api.github.com/repos/jleft/d3-financial-components/releases{/id}","created_at":"2014-11-11T13:44:40Z","updated_at":"2015-01-19T11:52:49Z","pushed_at":"2015-01-19T17:00:27Z","git_url":"git://github.com/jleft/d3-financial-components.git","ssh_url":"git@github.com:jleft/d3-financial-components.git","clone_url":"https://github.com/jleft/d3-financial-components.git","svn_url":"https://github.com/jleft/d3-financial-components","homepage":"","size":2832,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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:master","ref":"master","sha":"acfa9bd3ac5d89ad3466372c8a97386310350181","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":24850617,"name":"d3-financial-components","full_name":"ScottLogic/d3-financial-components","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/d3-financial-components","description":"A set of re-useable components for building financial charts with D3","fork":false,"url":"https://api.github.com/repos/ScottLogic/d3-financial-components","forks_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/forks","keys_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/teams","hooks_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/hooks","issue_events_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/issues/events{/number}","events_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/events","assignees_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/assignees{/user}","branches_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/branches{/branch}","tags_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/tags","blobs_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/statuses/{sha}","languages_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/languages","stargazers_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/stargazers","contributors_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/contributors","subscribers_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/subscribers","subscription_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/subscription","commits_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/issues/comments/{number}","contents_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/contents/{+path}","compare_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/merges","archive_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/downloads","issues_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/issues{/number}","pulls_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/pulls{/number}","milestones_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/milestones{/number}","notifications_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/labels{/name}","releases_url":"https://api.github.com/repos/ScottLogic/d3-financial-components/releases{/id}","created_at":"2014-10-06T15:03:11Z","updated_at":"2015-01-19T16:57:15Z","pushed_at":"2015-01-19T16:57:15Z","git_url":"git://github.com/ScottLogic/d3-financial-components.git","ssh_url":"git@github.com:ScottLogic/d3-financial-components.git","clone_url":"https://github.com/ScottLogic/d3-financial-components.git","svn_url":"https://github.com/ScottLogic/d3-financial-components","homepage":"","size":3767,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":37,"forks":7,"open_issues":37,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ScottLogic/d3-financial-components/pulls/256"},"html":{"href":"https://github.com/ScottLogic/d3-financial-components/pull/256"},"issue":{"href":"https://api.github.com/repos/ScottLogic/d3-financial-components/issues/256"},"comments":{"href":"https://api.github.com/repos/ScottLogic/d3-financial-components/issues/256/comments"},"review_comments":{"href":"https://api.github.com/repos/ScottLogic/d3-financial-components/pulls/256/comments"},"review_comment":{"href":"https://api.github.com/repos/ScottLogic/d3-financial-components/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ScottLogic/d3-financial-components/pulls/256/commits"},"statuses":{"href":"https://api.github.com/repos/ScottLogic/d3-financial-components/statuses/eae9250515538eeebc115c1b66c662349121c037"}}}}