RadCartesianChartView with horizontal scroll

2 posts, 0 answers
  1. Beka
    Beka avatar
    1 posts
    Member since:
    Jan 2016

    Posted 14 Jan Link to this post

    hello EveryOne

    i found good tutorials for begginers to create chartview.i mean  this tutorials (http://www.telerik.com/videos/android).i successfulle created chartview,but i have one problem(question).is it a possible to add horizontal scroll? .I need horizontall scroll because i parsed some datas from json and i has showed it in my chartview

    p.s 

    i also found this articl http://www.telerik.com/forums/zoom-and-or-scrolling-radchart but i did not understand it

    I'm using beta version

     

     

     

  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 18 Jan Link to this post

    Hi Beka,

    Thank you for your interest in Chart for Android

    We call the scrolling in Chart - pan. This article shows you how to add Pan and Zoom behavior. This behavior can be used to allow the users to pan and zoom the data on your chart by using gestures. If you don't want to let the users zoom but to manually zoom the chart so from the beginning the data is more visible. You can just set initial zoom to the chart by using chart's setZoom method:

    chartView.setZoom(5, 1);

    Then you will use the behavior for simply horizontal pan:

    ChartPanAndZoomBehavior panAndZoomBehavior = new ChartPanAndZoomBehavior();
    panAndZoomBehavior.setZoomMode(ChartPanZoomMode.NONE);
    panAndZoomBehavior.setPanMode(ChartPanZoomMode.HORIZONTAL);
    chartView.getBehaviors().add(panAndZoomBehavior);

    I hope this information helps. Let us know if you need further assistance.

    Regards,
    Todor
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top