{"action":"created","comment":{"url":"https://api.github.com/repos/n-riesco/plotly.js/pulls/comments/87062006","pull_request_review_id":7689401,"id":87062006,"diff_hunk":"@@ -33,7 +155,23 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout\n     coerce('base');\n     coerce('offset');\n     coerce('width');\n-    coerce('text');\n+\n+    coerceArray('text', coerceString);\n+\n+    var textPosition = coerceArray('textposition', coerceEnumerated);\n+\n+    var hasBoth = Array.isArray(textPosition) || textPosition === 'auto',\n+        hasInside = hasBoth || textPosition === 'inside',\n+        hasOutside = hasBoth || textPosition === 'outside';\n+    if(hasInside || hasOutside) {\n+        var textFont = coerceArray('textfont', coerceFont, layout.font);\n+        if(hasInside) {\n+            coerceArray('insidetextfont', coerceFont, textFont, layout.font);\n+        }\n+        if(hasOutside) {\n+            coerceArray('outsidetextfont', coerceFont, textFont, layout.font);\n+        }\n+    }","path":"src/traces/bar/defaults.js","position":157,"original_position":157,"commit_id":"2526e83c58cc2203d9336309d8de7d1ab082a9de","original_commit_id":"2526e83c58cc2203d9336309d8de7d1ab082a9de","user":{"login":"alexcjohnson","id":2678795,"avatar_url":"https://avatars.githubusercontent.com/u/2678795?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcjohnson","html_url":"https://github.com/alexcjohnson","followers_url":"https://api.github.com/users/alexcjohnson/followers","following_url":"https://api.github.com/users/alexcjohnson/following{/other_user}","gists_url":"https://api.github.com/users/alexcjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcjohnson/subscriptions","organizations_url":"https://api.github.com/users/alexcjohnson/orgs","repos_url":"https://api.github.com/users/alexcjohnson/repos","events_url":"https://api.github.com/users/alexcjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/alexcjohnson/received_events","type":"User","site_admin":false},"body":"Cool. Looks like the inheritance for non-arrays is as I'd expect 👍 . For arrays though, I'm not sure about the structure - I'd think for consistency with data attributes and src tags, it would be better to have family, size, and color be arrays, rather than have font be an array of objects.","created_at":"2016-11-08T19:15:19Z","updated_at":"2016-11-08T19:15:19Z","html_url":"https://github.com/n-riesco/plotly.js/pull/4#discussion_r87062006","pull_request_url":"https://api.github.com/repos/n-riesco/plotly.js/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/n-riesco/plotly.js/pulls/comments/87062006"},"html":{"href":"https://github.com/n-riesco/plotly.js/pull/4#discussion_r87062006"},"pull_request":{"href":"https://api.github.com/repos/n-riesco/plotly.js/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/n-riesco/plotly.js/pulls/4","id":92820573,"html_url":"https://github.com/n-riesco/plotly.js/pull/4","diff_url":"https://github.com/n-riesco/plotly.js/pull/4.diff","patch_url":"https://github.com/n-riesco/plotly.js/pull/4.patch","issue_url":"https://api.github.com/repos/n-riesco/plotly.js/issues/4","number":4,"state":"open","locked":false,"title":"Implement bar texts (issue 34)","user":{"login":"n-riesco","id":6199391,"avatar_url":"https://avatars.githubusercontent.com/u/6199391?v=3","gravatar_id":"","url":"https://api.github.com/users/n-riesco","html_url":"https://github.com/n-riesco","followers_url":"https://api.github.com/users/n-riesco/followers","following_url":"https://api.github.com/users/n-riesco/following{/other_user}","gists_url":"https://api.github.com/users/n-riesco/gists{/gist_id}","starred_url":"https://api.github.com/users/n-riesco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n-riesco/subscriptions","organizations_url":"https://api.github.com/users/n-riesco/orgs","repos_url":"https://api.github.com/users/n-riesco/repos","events_url":"https://api.github.com/users/n-riesco/events{/privacy}","received_events_url":"https://api.github.com/users/n-riesco/received_events","type":"User","site_admin":false},"body":"This PR implements attributes `textposition`, `textfont`, `insidetextfont` and `outsidetextfont` for bar traces.\r\n\r\nI've followed [this comment](https://github.com/plotly/plotly.js/issues/34#issuecomment-160645382) as close possible:\r\n- all these attributes accept arrays\r\n- default `textposition` is `none`\r\n- if `textposition` was set to `auto`, the `inside` options is preferred over `outside`\r\n- if `outside` was requested, but the bar is stacked under another bar, then the text is drawn `inside`\r\n- if `inside` was requested, but the bar is too small, then no text is drawn\r\n\r\nI've also added jasmine tests and mocks exercising the new functionality.","created_at":"2016-11-08T17:14:43Z","updated_at":"2016-11-08T19:15:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7fdb24e351b44ca0694ed28c1da83bd3d2479ddd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/n-riesco/plotly.js/pulls/4/commits","review_comments_url":"https://api.github.com/repos/n-riesco/plotly.js/pulls/4/comments","review_comment_url":"https://api.github.com/repos/n-riesco/plotly.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/n-riesco/plotly.js/issues/4/comments","statuses_url":"https://api.github.com/repos/n-riesco/plotly.js/statuses/2526e83c58cc2203d9336309d8de7d1ab082a9de","head":{"label":"n-riesco:pr-20161024-issue-34-textposition","ref":"pr-20161024-issue-34-textposition","sha":"2526e83c58cc2203d9336309d8de7d1ab082a9de","user":{"login":"n-riesco","id":6199391,"avatar_url":"https://avatars.githubusercontent.com/u/6199391?v=3","gravatar_id":"","url":"https://api.github.com/users/n-riesco","html_url":"https://github.com/n-riesco","followers_url":"https://api.github.com/users/n-riesco/followers","following_url":"https://api.github.com/users/n-riesco/following{/other_user}","gists_url":"https://api.github.com/users/n-riesco/gists{/gist_id}","starred_url":"https://api.github.com/users/n-riesco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n-riesco/subscriptions","organizations_url":"https://api.github.com/users/n-riesco/orgs","repos_url":"https://api.github.com/users/n-riesco/repos","events_url":"https://api.github.com/users/n-riesco/events{/privacy}","received_events_url":"https://api.github.com/users/n-riesco/received_events","type":"User","site_admin":false},"repo":{"id":55012447,"name":"plotly.js","full_name":"n-riesco/plotly.js","owner":{"login":"n-riesco","id":6199391,"avatar_url":"https://avatars.githubusercontent.com/u/6199391?v=3","gravatar_id":"","url":"https://api.github.com/users/n-riesco","html_url":"https://github.com/n-riesco","followers_url":"https://api.github.com/users/n-riesco/followers","following_url":"https://api.github.com/users/n-riesco/following{/other_user}","gists_url":"https://api.github.com/users/n-riesco/gists{/gist_id}","starred_url":"https://api.github.com/users/n-riesco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n-riesco/subscriptions","organizations_url":"https://api.github.com/users/n-riesco/orgs","repos_url":"https://api.github.com/users/n-riesco/repos","events_url":"https://api.github.com/users/n-riesco/events{/privacy}","received_events_url":"https://api.github.com/users/n-riesco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/n-riesco/plotly.js","description":"The open source javascript graphing library that powers plotly","fork":true,"url":"https://api.github.com/repos/n-riesco/plotly.js","forks_url":"https://api.github.com/repos/n-riesco/plotly.js/forks","keys_url":"https://api.github.com/repos/n-riesco/plotly.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/n-riesco/plotly.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/n-riesco/plotly.js/teams","hooks_url":"https://api.github.com/repos/n-riesco/plotly.js/hooks","issue_events_url":"https://api.github.com/repos/n-riesco/plotly.js/issues/events{/number}","events_url":"https://api.github.com/repos/n-riesco/plotly.js/events","assignees_url":"https://api.github.com/repos/n-riesco/plotly.js/assignees{/user}","branches_url":"https://api.github.com/repos/n-riesco/plotly.js/branches{/branch}","tags_url":"https://api.github.com/repos/n-riesco/plotly.js/tags","blobs_url":"https://api.github.com/repos/n-riesco/plotly.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/n-riesco/plotly.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/n-riesco/plotly.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/n-riesco/plotly.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/n-riesco/plotly.js/statuses/{sha}","languages_url":"https://api.github.com/repos/n-riesco/plotly.js/languages","stargazers_url":"https://api.github.com/repos/n-riesco/plotly.js/stargazers","contributors_url":"https://api.github.com/repos/n-riesco/plotly.js/contributors","subscribers_url":"https://api.github.com/repos/n-riesco/plotly.js/subscribers","subscription_url":"https://api.github.com/repos/n-riesco/plotly.js/subscription","commits_url":"https://api.github.com/repos/n-riesco/plotly.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/n-riesco/plotly.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/n-riesco/plotly.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/n-riesco/plotly.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/n-riesco/plotly.js/contents/{+path}","compare_url":"https://api.github.com/repos/n-riesco/plotly.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/n-riesco/plotly.js/merges","archive_url":"https://api.github.com/repos/n-riesco/plotly.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/n-riesco/plotly.js/downloads","issues_url":"https://api.github.com/repos/n-riesco/plotly.js/issues{/number}","pulls_url":"https://api.github.com/repos/n-riesco/plotly.js/pulls{/number}","milestones_url":"https://api.github.com/repos/n-riesco/plotly.js/milestones{/number}","notifications_url":"https://api.github.com/repos/n-riesco/plotly.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/n-riesco/plotly.js/labels{/name}","releases_url":"https://api.github.com/repos/n-riesco/plotly.js/releases{/id}","deployments_url":"https://api.github.com/repos/n-riesco/plotly.js/deployments","created_at":"2016-03-29T21:41:41Z","updated_at":"2016-03-29T21:41:44Z","pushed_at":"2016-11-08T17:14:44Z","git_url":"git://github.com/n-riesco/plotly.js.git","ssh_url":"git@github.com:n-riesco/plotly.js.git","clone_url":"https://github.com/n-riesco/plotly.js.git","svn_url":"https://github.com/n-riesco/plotly.js","homepage":"https://plot.ly/javascript/","size":145369,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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":"n-riesco:master","ref":"master","sha":"5da21cbdfcf1203a953e61fd9b2ca34a8cfe77bc","user":{"login":"n-riesco","id":6199391,"avatar_url":"https://avatars.githubusercontent.com/u/6199391?v=3","gravatar_id":"","url":"https://api.github.com/users/n-riesco","html_url":"https://github.com/n-riesco","followers_url":"https://api.github.com/users/n-riesco/followers","following_url":"https://api.github.com/users/n-riesco/following{/other_user}","gists_url":"https://api.github.com/users/n-riesco/gists{/gist_id}","starred_url":"https://api.github.com/users/n-riesco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n-riesco/subscriptions","organizations_url":"https://api.github.com/users/n-riesco/orgs","repos_url":"https://api.github.com/users/n-riesco/repos","events_url":"https://api.github.com/users/n-riesco/events{/privacy}","received_events_url":"https://api.github.com/users/n-riesco/received_events","type":"User","site_admin":false},"repo":{"id":55012447,"name":"plotly.js","full_name":"n-riesco/plotly.js","owner":{"login":"n-riesco","id":6199391,"avatar_url":"https://avatars.githubusercontent.com/u/6199391?v=3","gravatar_id":"","url":"https://api.github.com/users/n-riesco","html_url":"https://github.com/n-riesco","followers_url":"https://api.github.com/users/n-riesco/followers","following_url":"https://api.github.com/users/n-riesco/following{/other_user}","gists_url":"https://api.github.com/users/n-riesco/gists{/gist_id}","starred_url":"https://api.github.com/users/n-riesco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n-riesco/subscriptions","organizations_url":"https://api.github.com/users/n-riesco/orgs","repos_url":"https://api.github.com/users/n-riesco/repos","events_url":"https://api.github.com/users/n-riesco/events{/privacy}","received_events_url":"https://api.github.com/users/n-riesco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/n-riesco/plotly.js","description":"The open source javascript graphing library that powers plotly","fork":true,"url":"https://api.github.com/repos/n-riesco/plotly.js","forks_url":"https://api.github.com/repos/n-riesco/plotly.js/forks","keys_url":"https://api.github.com/repos/n-riesco/plotly.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/n-riesco/plotly.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/n-riesco/plotly.js/teams","hooks_url":"https://api.github.com/repos/n-riesco/plotly.js/hooks","issue_events_url":"https://api.github.com/repos/n-riesco/plotly.js/issues/events{/number}","events_url":"https://api.github.com/repos/n-riesco/plotly.js/events","assignees_url":"https://api.github.com/repos/n-riesco/plotly.js/assignees{/user}","branches_url":"https://api.github.com/repos/n-riesco/plotly.js/branches{/branch}","tags_url":"https://api.github.com/repos/n-riesco/plotly.js/tags","blobs_url":"https://api.github.com/repos/n-riesco/plotly.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/n-riesco/plotly.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/n-riesco/plotly.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/n-riesco/plotly.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/n-riesco/plotly.js/statuses/{sha}","languages_url":"https://api.github.com/repos/n-riesco/plotly.js/languages","stargazers_url":"https://api.github.com/repos/n-riesco/plotly.js/stargazers","contributors_url":"https://api.github.com/repos/n-riesco/plotly.js/contributors","subscribers_url":"https://api.github.com/repos/n-riesco/plotly.js/subscribers","subscription_url":"https://api.github.com/repos/n-riesco/plotly.js/subscription","commits_url":"https://api.github.com/repos/n-riesco/plotly.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/n-riesco/plotly.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/n-riesco/plotly.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/n-riesco/plotly.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/n-riesco/plotly.js/contents/{+path}","compare_url":"https://api.github.com/repos/n-riesco/plotly.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/n-riesco/plotly.js/merges","archive_url":"https://api.github.com/repos/n-riesco/plotly.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/n-riesco/plotly.js/downloads","issues_url":"https://api.github.com/repos/n-riesco/plotly.js/issues{/number}","pulls_url":"https://api.github.com/repos/n-riesco/plotly.js/pulls{/number}","milestones_url":"https://api.github.com/repos/n-riesco/plotly.js/milestones{/number}","notifications_url":"https://api.github.com/repos/n-riesco/plotly.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/n-riesco/plotly.js/labels{/name}","releases_url":"https://api.github.com/repos/n-riesco/plotly.js/releases{/id}","deployments_url":"https://api.github.com/repos/n-riesco/plotly.js/deployments","created_at":"2016-03-29T21:41:41Z","updated_at":"2016-03-29T21:41:44Z","pushed_at":"2016-11-08T17:14:44Z","git_url":"git://github.com/n-riesco/plotly.js.git","ssh_url":"git@github.com:n-riesco/plotly.js.git","clone_url":"https://github.com/n-riesco/plotly.js.git","svn_url":"https://github.com/n-riesco/plotly.js","homepage":"https://plot.ly/javascript/","size":145369,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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/n-riesco/plotly.js/pulls/4"},"html":{"href":"https://github.com/n-riesco/plotly.js/pull/4"},"issue":{"href":"https://api.github.com/repos/n-riesco/plotly.js/issues/4"},"comments":{"href":"https://api.github.com/repos/n-riesco/plotly.js/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/n-riesco/plotly.js/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/n-riesco/plotly.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/n-riesco/plotly.js/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/n-riesco/plotly.js/statuses/2526e83c58cc2203d9336309d8de7d1ab082a9de"}}}}
{"actor":{"display_login":"alexcjohnson"}}