{"action":"created","comment":{"url":"https://api.github.com/repos/novus/nvd3/pulls/comments/29305910","id":29305910,"diff_hunk":"@@ -379,10 +389,25 @@ nv.models.stackedAreaChart = function() {\n \n                 var xValue = xAxis.tickFormat()(chart.x()(singlePoint,pointIndex));\n \n+                // Keeps track of the tooltip valueFormatter if the chart changes to expanded view\n+                if (stacked.style() === 'expand' || stacked.style() === 'stack_percent') {\n+                    if ( !oldValueFormatter ) {\n+                        oldValueFormatter = interactiveLayer.tooltip.valueFormatter();\n+                    }\n+                    //Forces the tooltip to use percentage in 'expand' mode.\n+                    interactiveLayer.tooltip.valueFormatter(yAxis.tickFormat(d3.format('%')));\n+                }\n+                else {\n+                    if (oldValueFormatter) {\n+                        interactiveLayer.tooltip.valueFormatter(oldValueFormatter);\n+                        oldValueFormatter = null;\n+                    }\n+                }\n+\n                 //If we are in 'expand' mode, force the format to be a percentage.\n                 var valueFormatter = (stacked.style() == 'expand') ?\n                     function(d,i) {return d == null ? \"N/A\" : d3.format(\".1%\")(d);} :\n-                    function(d,i) {return d == null ? \"N/A\" : yAxis.tickFormat()(d); };\n+                    interactiveLayer.tooltip.valueFormatter();","path":"src/models/stackedAreaChart.js","position":42,"original_position":42,"commit_id":"662b46ce6737839009f9477d5a2aabef7102a48b","original_commit_id":"662b46ce6737839009f9477d5a2aabef7102a48b","user":{"login":"liquidpele","id":1065913,"avatar_url":"https://avatars.githubusercontent.com/u/1065913?v=3","gravatar_id":"","url":"https://api.github.com/users/liquidpele","html_url":"https://github.com/liquidpele","followers_url":"https://api.github.com/users/liquidpele/followers","following_url":"https://api.github.com/users/liquidpele/following{/other_user}","gists_url":"https://api.github.com/users/liquidpele/gists{/gist_id}","starred_url":"https://api.github.com/users/liquidpele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liquidpele/subscriptions","organizations_url":"https://api.github.com/users/liquidpele/orgs","repos_url":"https://api.github.com/users/liquidpele/repos","events_url":"https://api.github.com/users/liquidpele/events{/privacy}","received_events_url":"https://api.github.com/users/liquidpele/received_events","type":"User","site_admin":false},"body":"Doing this means once it goes to expand it saves that as the valueFormatter so then this returns that so it would always stay that way...","created_at":"2015-04-29T02:03:33Z","updated_at":"2015-04-29T02:03:33Z","html_url":"https://github.com/novus/nvd3/pull/1001#discussion_r29305910","pull_request_url":"https://api.github.com/repos/novus/nvd3/pulls/1001","_links":{"self":{"href":"https://api.github.com/repos/novus/nvd3/pulls/comments/29305910"},"html":{"href":"https://github.com/novus/nvd3/pull/1001#discussion_r29305910"},"pull_request":{"href":"https://api.github.com/repos/novus/nvd3/pulls/1001"}}},"pull_request":{"url":"https://api.github.com/repos/novus/nvd3/pulls/1001","id":34327994,"html_url":"https://github.com/novus/nvd3/pull/1001","diff_url":"https://github.com/novus/nvd3/pull/1001.diff","patch_url":"https://github.com/novus/nvd3/pull/1001.patch","issue_url":"https://api.github.com/repos/novus/nvd3/issues/1001","number":1001,"state":"open","locked":false,"title":"fixing stackedArea tooltip formatting","user":{"login":"lucaslin","id":1623899,"avatar_url":"https://avatars.githubusercontent.com/u/1623899?v=3","gravatar_id":"","url":"https://api.github.com/users/lucaslin","html_url":"https://github.com/lucaslin","followers_url":"https://api.github.com/users/lucaslin/followers","following_url":"https://api.github.com/users/lucaslin/following{/other_user}","gists_url":"https://api.github.com/users/lucaslin/gists{/gist_id}","starred_url":"https://api.github.com/users/lucaslin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucaslin/subscriptions","organizations_url":"https://api.github.com/users/lucaslin/orgs","repos_url":"https://api.github.com/users/lucaslin/repos","events_url":"https://api.github.com/users/lucaslin/events{/privacy}","received_events_url":"https://api.github.com/users/lucaslin/received_events","type":"User","site_admin":false},"body":"allowing users to set valueFormatter for interactiveLayer.tooltip (it\r\nwas previously being overwritten)\r\n\r\nThis change should also be implemented on other charts that use\r\ninteractiveLayer.tooltip\r\n\r\nNewer iteration of #986\r\n\r\nI believe I found a fix using the same method `yAxis.tickFormat` uses.\r\n\r\nSee [this plunk](http://plnkr.co/edit/RGxg04vhFvGl3uLTJ3Cy?p=preview).","created_at":"2015-04-29T01:46:29Z","updated_at":"2015-04-29T02:03:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de9e804bdfcd05607d352d9f98e88195b8acc9c5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/novus/nvd3/pulls/1001/commits","review_comments_url":"https://api.github.com/repos/novus/nvd3/pulls/1001/comments","review_comment_url":"https://api.github.com/repos/novus/nvd3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/novus/nvd3/issues/1001/comments","statuses_url":"https://api.github.com/repos/novus/nvd3/statuses/662b46ce6737839009f9477d5a2aabef7102a48b","head":{"label":"lucaslin:development","ref":"development","sha":"662b46ce6737839009f9477d5a2aabef7102a48b","user":{"login":"lucaslin","id":1623899,"avatar_url":"https://avatars.githubusercontent.com/u/1623899?v=3","gravatar_id":"","url":"https://api.github.com/users/lucaslin","html_url":"https://github.com/lucaslin","followers_url":"https://api.github.com/users/lucaslin/followers","following_url":"https://api.github.com/users/lucaslin/following{/other_user}","gists_url":"https://api.github.com/users/lucaslin/gists{/gist_id}","starred_url":"https://api.github.com/users/lucaslin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucaslin/subscriptions","organizations_url":"https://api.github.com/users/lucaslin/orgs","repos_url":"https://api.github.com/users/lucaslin/repos","events_url":"https://api.github.com/users/lucaslin/events{/privacy}","received_events_url":"https://api.github.com/users/lucaslin/received_events","type":"User","site_admin":false},"repo":{"id":34696141,"name":"nvd3","full_name":"lucaslin/nvd3","owner":{"login":"lucaslin","id":1623899,"avatar_url":"https://avatars.githubusercontent.com/u/1623899?v=3","gravatar_id":"","url":"https://api.github.com/users/lucaslin","html_url":"https://github.com/lucaslin","followers_url":"https://api.github.com/users/lucaslin/followers","following_url":"https://api.github.com/users/lucaslin/following{/other_user}","gists_url":"https://api.github.com/users/lucaslin/gists{/gist_id}","starred_url":"https://api.github.com/users/lucaslin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucaslin/subscriptions","organizations_url":"https://api.github.com/users/lucaslin/orgs","repos_url":"https://api.github.com/users/lucaslin/repos","events_url":"https://api.github.com/users/lucaslin/events{/privacy}","received_events_url":"https://api.github.com/users/lucaslin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lucaslin/nvd3","description":"A reusable charting library written in d3.js","fork":true,"url":"https://api.github.com/repos/lucaslin/nvd3","forks_url":"https://api.github.com/repos/lucaslin/nvd3/forks","keys_url":"https://api.github.com/repos/lucaslin/nvd3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucaslin/nvd3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucaslin/nvd3/teams","hooks_url":"https://api.github.com/repos/lucaslin/nvd3/hooks","issue_events_url":"https://api.github.com/repos/lucaslin/nvd3/issues/events{/number}","events_url":"https://api.github.com/repos/lucaslin/nvd3/events","assignees_url":"https://api.github.com/repos/lucaslin/nvd3/assignees{/user}","branches_url":"https://api.github.com/repos/lucaslin/nvd3/branches{/branch}","tags_url":"https://api.github.com/repos/lucaslin/nvd3/tags","blobs_url":"https://api.github.com/repos/lucaslin/nvd3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucaslin/nvd3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucaslin/nvd3/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucaslin/nvd3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucaslin/nvd3/statuses/{sha}","languages_url":"https://api.github.com/repos/lucaslin/nvd3/languages","stargazers_url":"https://api.github.com/repos/lucaslin/nvd3/stargazers","contributors_url":"https://api.github.com/repos/lucaslin/nvd3/contributors","subscribers_url":"https://api.github.com/repos/lucaslin/nvd3/subscribers","subscription_url":"https://api.github.com/repos/lucaslin/nvd3/subscription","commits_url":"https://api.github.com/repos/lucaslin/nvd3/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucaslin/nvd3/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucaslin/nvd3/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucaslin/nvd3/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucaslin/nvd3/contents/{+path}","compare_url":"https://api.github.com/repos/lucaslin/nvd3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucaslin/nvd3/merges","archive_url":"https://api.github.com/repos/lucaslin/nvd3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucaslin/nvd3/downloads","issues_url":"https://api.github.com/repos/lucaslin/nvd3/issues{/number}","pulls_url":"https://api.github.com/repos/lucaslin/nvd3/pulls{/number}","milestones_url":"https://api.github.com/repos/lucaslin/nvd3/milestones{/number}","notifications_url":"https://api.github.com/repos/lucaslin/nvd3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucaslin/nvd3/labels{/name}","releases_url":"https://api.github.com/repos/lucaslin/nvd3/releases{/id}","created_at":"2015-04-27T23:11:28Z","updated_at":"2015-04-27T23:11:29Z","pushed_at":"2015-04-28T23:56:37Z","git_url":"git://github.com/lucaslin/nvd3.git","ssh_url":"git@github.com:lucaslin/nvd3.git","clone_url":"https://github.com/lucaslin/nvd3.git","svn_url":"https://github.com/lucaslin/nvd3","homepage":"http://nvd3.org/","size":20737,"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":"novus:development","ref":"development","sha":"18ba819e3fa8b7dcbfea5bf8fb24b9fcc1e4dd6c","user":{"login":"novus","id":293390,"avatar_url":"https://avatars.githubusercontent.com/u/293390?v=3","gravatar_id":"","url":"https://api.github.com/users/novus","html_url":"https://github.com/novus","followers_url":"https://api.github.com/users/novus/followers","following_url":"https://api.github.com/users/novus/following{/other_user}","gists_url":"https://api.github.com/users/novus/gists{/gist_id}","starred_url":"https://api.github.com/users/novus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novus/subscriptions","organizations_url":"https://api.github.com/users/novus/orgs","repos_url":"https://api.github.com/users/novus/repos","events_url":"https://api.github.com/users/novus/events{/privacy}","received_events_url":"https://api.github.com/users/novus/received_events","type":"Organization","site_admin":false},"repo":{"id":6709682,"name":"nvd3","full_name":"novus/nvd3","owner":{"login":"novus","id":293390,"avatar_url":"https://avatars.githubusercontent.com/u/293390?v=3","gravatar_id":"","url":"https://api.github.com/users/novus","html_url":"https://github.com/novus","followers_url":"https://api.github.com/users/novus/followers","following_url":"https://api.github.com/users/novus/following{/other_user}","gists_url":"https://api.github.com/users/novus/gists{/gist_id}","starred_url":"https://api.github.com/users/novus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novus/subscriptions","organizations_url":"https://api.github.com/users/novus/orgs","repos_url":"https://api.github.com/users/novus/repos","events_url":"https://api.github.com/users/novus/events{/privacy}","received_events_url":"https://api.github.com/users/novus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/novus/nvd3","description":"A reusable charting library written in d3.js","fork":false,"url":"https://api.github.com/repos/novus/nvd3","forks_url":"https://api.github.com/repos/novus/nvd3/forks","keys_url":"https://api.github.com/repos/novus/nvd3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/novus/nvd3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/novus/nvd3/teams","hooks_url":"https://api.github.com/repos/novus/nvd3/hooks","issue_events_url":"https://api.github.com/repos/novus/nvd3/issues/events{/number}","events_url":"https://api.github.com/repos/novus/nvd3/events","assignees_url":"https://api.github.com/repos/novus/nvd3/assignees{/user}","branches_url":"https://api.github.com/repos/novus/nvd3/branches{/branch}","tags_url":"https://api.github.com/repos/novus/nvd3/tags","blobs_url":"https://api.github.com/repos/novus/nvd3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/novus/nvd3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/novus/nvd3/git/refs{/sha}","trees_url":"https://api.github.com/repos/novus/nvd3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/novus/nvd3/statuses/{sha}","languages_url":"https://api.github.com/repos/novus/nvd3/languages","stargazers_url":"https://api.github.com/repos/novus/nvd3/stargazers","contributors_url":"https://api.github.com/repos/novus/nvd3/contributors","subscribers_url":"https://api.github.com/repos/novus/nvd3/subscribers","subscription_url":"https://api.github.com/repos/novus/nvd3/subscription","commits_url":"https://api.github.com/repos/novus/nvd3/commits{/sha}","git_commits_url":"https://api.github.com/repos/novus/nvd3/git/commits{/sha}","comments_url":"https://api.github.com/repos/novus/nvd3/comments{/number}","issue_comment_url":"https://api.github.com/repos/novus/nvd3/issues/comments{/number}","contents_url":"https://api.github.com/repos/novus/nvd3/contents/{+path}","compare_url":"https://api.github.com/repos/novus/nvd3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/novus/nvd3/merges","archive_url":"https://api.github.com/repos/novus/nvd3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/novus/nvd3/downloads","issues_url":"https://api.github.com/repos/novus/nvd3/issues{/number}","pulls_url":"https://api.github.com/repos/novus/nvd3/pulls{/number}","milestones_url":"https://api.github.com/repos/novus/nvd3/milestones{/number}","notifications_url":"https://api.github.com/repos/novus/nvd3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/novus/nvd3/labels{/name}","releases_url":"https://api.github.com/repos/novus/nvd3/releases{/id}","created_at":"2012-11-15T18:51:59Z","updated_at":"2015-04-28T18:32:19Z","pushed_at":"2015-04-29T01:46:29Z","git_url":"git://github.com/novus/nvd3.git","ssh_url":"git@github.com:novus/nvd3.git","clone_url":"https://github.com/novus/nvd3.git","svn_url":"https://github.com/novus/nvd3","homepage":"http://nvd3.org/","size":20737,"stargazers_count":3681,"watchers_count":3681,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1266,"mirror_url":null,"open_issues_count":79,"forks":1266,"open_issues":79,"watchers":3681,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/novus/nvd3/pulls/1001"},"html":{"href":"https://github.com/novus/nvd3/pull/1001"},"issue":{"href":"https://api.github.com/repos/novus/nvd3/issues/1001"},"comments":{"href":"https://api.github.com/repos/novus/nvd3/issues/1001/comments"},"review_comments":{"href":"https://api.github.com/repos/novus/nvd3/pulls/1001/comments"},"review_comment":{"href":"https://api.github.com/repos/novus/nvd3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/novus/nvd3/pulls/1001/commits"},"statuses":{"href":"https://api.github.com/repos/novus/nvd3/statuses/662b46ce6737839009f9477d5a2aabef7102a48b"}}}}