{"action":"created","issue":{"url":"https://api.github.com/repos/patternfly/angular-patternfly/issues/541","repository_url":"https://api.github.com/repos/patternfly/angular-patternfly","labels_url":"https://api.github.com/repos/patternfly/angular-patternfly/issues/541/labels{/name}","comments_url":"https://api.github.com/repos/patternfly/angular-patternfly/issues/541/comments","events_url":"https://api.github.com/repos/patternfly/angular-patternfly/issues/541/events","html_url":"https://github.com/patternfly/angular-patternfly/issues/541","id":247187348,"number":541,"title":"Adding data points to a chart causes the page to automatically scroll upwards","user":{"login":"aptmac","id":10425301,"avatar_url":"https://avatars2.githubusercontent.com/u/10425301?v=4","gravatar_id":"","url":"https://api.github.com/users/aptmac","html_url":"https://github.com/aptmac","followers_url":"https://api.github.com/users/aptmac/followers","following_url":"https://api.github.com/users/aptmac/following{/other_user}","gists_url":"https://api.github.com/users/aptmac/gists{/gist_id}","starred_url":"https://api.github.com/users/aptmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aptmac/subscriptions","organizations_url":"https://api.github.com/users/aptmac/orgs","repos_url":"https://api.github.com/users/aptmac/repos","events_url":"https://api.github.com/users/aptmac/events{/privacy}","received_events_url":"https://api.github.com/users/aptmac/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-01T20:14:15Z","updated_at":"2017-08-17T18:10:06Z","closed_at":null,"body":"**Issue:**\r\n\r\nWhen a chart refreshes after updating/adding a new point to a chart, the page automatically scrolls upwards. \r\n\r\n**To reproduce:**\r\nI found several instances of this behaviour when browsing the [angular-patternfly documentation](http://www.patternfly.org/angular-patternfly/#/api), including:\r\n\r\n1. [donut chart](http://www.patternfly.org/angular-patternfly/#/api/patternfly.charts.component:pfDonutPctChart): medium screen size and smaller, scroll to the bottom of the page and when the \"Ok Threshold\" donut chart updates, the screen will scroll upwards.\r\n2. [line chart](http://www.patternfly.org/angular-patternfly/#/api/patternfly.charts.component:pfLineChart) & [sparkline chart](http://www.patternfly.org/angular-patternfly/#/api/patternfly.charts.component:pfSparklineChart): medium screen size or smaller, scroll to the bottom of the page and click the \"Add Data Point\" button; the screen should scroll up a small amount.\r\n3. [trends chart](http://www.patternfly.org/angular-patternfly/#/api/patternfly.charts.directive:pfTrendsChart): all screen sizes, scroll to the bottom of the page and click the \"Add Data Point\" button; the screen should scroll up a small amount.\r\n\r\nI originally saw this behaviour with some charts I'm currently working on, here are two gifs that show how the chart behaved in 3.23.3 (top) and in the latest release. 4.2.0 (bottom).\r\n\r\n3.23.3:\r\n![3.23.3](https://user-images.githubusercontent.com/10425301/28844800-da883b1a-76d3-11e7-8ddf-9fab1c7d694f.gif)\r\n\r\n4.2.0 (in this gif I'm scrolling to the bottom of the page after each chart refresh):\r\n![4.2.0](https://user-images.githubusercontent.com/10425301/28844793-d33c666a-76d3-11e7-9001-487f0fe5c282.gif)"},"comment":{"url":"https://api.github.com/repos/patternfly/angular-patternfly/issues/comments/323151127","html_url":"https://github.com/patternfly/angular-patternfly/issues/541#issuecomment-323151127","issue_url":"https://api.github.com/repos/patternfly/angular-patternfly/issues/541","id":323151127,"user":{"login":"aptmac","id":10425301,"avatar_url":"https://avatars2.githubusercontent.com/u/10425301?v=4","gravatar_id":"","url":"https://api.github.com/users/aptmac","html_url":"https://github.com/aptmac","followers_url":"https://api.github.com/users/aptmac/followers","following_url":"https://api.github.com/users/aptmac/following{/other_user}","gists_url":"https://api.github.com/users/aptmac/gists{/gist_id}","starred_url":"https://api.github.com/users/aptmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aptmac/subscriptions","organizations_url":"https://api.github.com/users/aptmac/orgs","repos_url":"https://api.github.com/users/aptmac/repos","events_url":"https://api.github.com/users/aptmac/events{/privacy}","received_events_url":"https://api.github.com/users/aptmac/received_events","type":"User","site_admin":false},"created_at":"2017-08-17T18:10:06Z","updated_at":"2017-08-17T18:10:06Z","body":"I'm working on a fix for this."}}
{"actor":{"display_login":"aptmac"}}