{"action":"created","issue":{"url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/1578","repository_url":"https://api.github.com/repos/PhilJay/MPAndroidChart","labels_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/1578/labels{/name}","comments_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/1578/comments","events_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/1578/events","html_url":"https://github.com/PhilJay/MPAndroidChart/issues/1578","id":140995804,"number":1578,"title":"Scroll and zoom multiple charts simultaneously","user":{"login":"lanitahedgehog","id":15926835,"avatar_url":"https://avatars.githubusercontent.com/u/15926835?v=3","gravatar_id":"","url":"https://api.github.com/users/lanitahedgehog","html_url":"https://github.com/lanitahedgehog","followers_url":"https://api.github.com/users/lanitahedgehog/followers","following_url":"https://api.github.com/users/lanitahedgehog/following{/other_user}","gists_url":"https://api.github.com/users/lanitahedgehog/gists{/gist_id}","starred_url":"https://api.github.com/users/lanitahedgehog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanitahedgehog/subscriptions","organizations_url":"https://api.github.com/users/lanitahedgehog/orgs","repos_url":"https://api.github.com/users/lanitahedgehog/repos","events_url":"https://api.github.com/users/lanitahedgehog/events{/privacy}","received_events_url":"https://api.github.com/users/lanitahedgehog/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-15T14:53:48Z","updated_at":"2016-03-15T22:20:47Z","closed_at":null,"body":"I have a screen with several chartviews on it.\r\n\r\nWhat I need is to when user scrolls/zooms one chart, other charts scroll and zoom also.\r\n\r\nI know that on IOS, you can set a scale and translate listener and use refreshWithNewMatrix method to update all views with new scroll/zoom data. But on Android I tried to set ChartGestureListener and invoke this method in onChartScale and onChartTranslate but it only returned my views (that I need to scroll/scale programmatically) to fitscreen.\r\n\r\nPlease, tell if this feature is supported on Android? Or maybe there is a better way to do this?"},"comment":{"url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/comments/197050902","html_url":"https://github.com/PhilJay/MPAndroidChart/issues/1578#issuecomment-197050902","issue_url":"https://api.github.com/repos/PhilJay/MPAndroidChart/issues/1578","id":197050902,"user":{"login":"vit001","id":3802799,"avatar_url":"https://avatars.githubusercontent.com/u/3802799?v=3","gravatar_id":"","url":"https://api.github.com/users/vit001","html_url":"https://github.com/vit001","followers_url":"https://api.github.com/users/vit001/followers","following_url":"https://api.github.com/users/vit001/following{/other_user}","gists_url":"https://api.github.com/users/vit001/gists{/gist_id}","starred_url":"https://api.github.com/users/vit001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vit001/subscriptions","organizations_url":"https://api.github.com/users/vit001/orgs","repos_url":"https://api.github.com/users/vit001/repos","events_url":"https://api.github.com/users/vit001/events{/privacy}","received_events_url":"https://api.github.com/users/vit001/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T22:20:47Z","updated_at":"2016-03-15T22:20:47Z","body":"In your onChartScale callback, why don't you retrieve the scale/scroll as:\r\n```\r\n            float scaleX = chart.getScaleX();\r\n            float scaleY = chart.getScaleY();\r\n            float xValue = chart.getViewPortHandler().getContentCenter().x;\r\n            float yValue = chart.getViewPortHandler().getContentCenter().y;\r\n```\r\nand then set the scale/scroll on your other charts using:\r\n\r\n`otherchart.getViewPortHandler().setZoom( scaleX, scaleY, xValue, yValue );`\r\n\r\nBut seriously, this sort of question belongs to stackoverflow and not here.\r\n"}}