{"action":"created","issue":{"url":"https://api.github.com/repos/lecho/hellocharts-android/issues/87","labels_url":"https://api.github.com/repos/lecho/hellocharts-android/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/lecho/hellocharts-android/issues/87/comments","events_url":"https://api.github.com/repos/lecho/hellocharts-android/issues/87/events","html_url":"https://github.com/lecho/hellocharts-android/issues/87","id":59616280,"number":87,"title":"How to create a chart which can scroll horizontal like HorizontalScrollView,not zoom it by fingers","user":{"login":"wyq01","id":2276398,"avatar_url":"https://avatars.githubusercontent.com/u/2276398?v=3","gravatar_id":"","url":"https://api.github.com/users/wyq01","html_url":"https://github.com/wyq01","followers_url":"https://api.github.com/users/wyq01/followers","following_url":"https://api.github.com/users/wyq01/following{/other_user}","gists_url":"https://api.github.com/users/wyq01/gists{/gist_id}","starred_url":"https://api.github.com/users/wyq01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wyq01/subscriptions","organizations_url":"https://api.github.com/users/wyq01/orgs","repos_url":"https://api.github.com/users/wyq01/repos","events_url":"https://api.github.com/users/wyq01/events{/privacy}","received_events_url":"https://api.github.com/users/wyq01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-03T09:33:16Z","updated_at":"2015-03-03T19:36:10Z","closed_at":null,"body":""},"comment":{"url":"https://api.github.com/repos/lecho/hellocharts-android/issues/comments/77017628","html_url":"https://github.com/lecho/hellocharts-android/issues/87#issuecomment-77017628","issue_url":"https://api.github.com/repos/lecho/hellocharts-android/issues/87","id":77017628,"user":{"login":"lecho","id":545637,"avatar_url":"https://avatars.githubusercontent.com/u/545637?v=3","gravatar_id":"","url":"https://api.github.com/users/lecho","html_url":"https://github.com/lecho","followers_url":"https://api.github.com/users/lecho/followers","following_url":"https://api.github.com/users/lecho/following{/other_user}","gists_url":"https://api.github.com/users/lecho/gists{/gist_id}","starred_url":"https://api.github.com/users/lecho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lecho/subscriptions","organizations_url":"https://api.github.com/users/lecho/orgs","repos_url":"https://api.github.com/users/lecho/repos","events_url":"https://api.github.com/users/lecho/events{/privacy}","received_events_url":"https://api.github.com/users/lecho/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T19:36:10Z","updated_at":"2015-03-03T19:36:10Z","body":"Hi, chart have maximum viewport(max and min values for X and Y axes) and current viewport. User can scroll chart If current viewport is smaller than and within max viewport. So for horizontal scroll you need to set current viewport width to be less than max viewport width. If your X values are in range [0, 100] maximum viewport width will be equal 100 because `maxViewport.left=0` and `maxViewport.right=100`, so, for example, if you set `currentViewport.left=40` and `currentViewport.right=60` you will be able to scroll chart horizontally.\r\n\r\nCode example:\r\n```java\r\n//First configure all other chart attributes and chart's data\r\n//Than configure viewport\r\nViewport v = new Viewport(chart.getMaximumViewport());\r\nv.left = 40;\r\nv.right = 60;\r\nchart.setCurrentViewport(v);//important: set current viewport only, don't modify max viewport\r\n//Optional, to disable zoom\r\n//chart.setZoomEnabled(false);\r\n//or\r\n//chart.setZoomType(ZoomType.VERTICAL);\r\n```"}}