Chart with lots of datapoints and horizontal scrolling

4 posts, 0 answers
  1. Dan
    Dan avatar
    11 posts
    Member since:
    Mar 2009

    Posted 24 Jul 2009 Link to this post

    I have modified the "DeclarativeChart" example so that the first bar series has around 60 datapoints.  When you do this, the bars get scrunched up. What I want to do is keep the width of the bars the same, but have a scroll bar on the chart.

    I have searched the forums and look over the examples but cannot figure out how to do this.  I set the width of the RadChart to 1000 and then wrapped the entire RadChart with a scrollviewer, but that does not seem to work. 

    I bet this is easy but i cannot figure out how to add a horizontal scrollbar on charts with alot of datapoints.  anyhone help?

    Thanks,
    Dan
  2. Luda
    Luda avatar
    2 posts
    Member since:
    Jan 2009

    Posted 27 Jul 2009 Link to this post

    Hi Dan,
    It's my solution for the same problem:

    <

     

    Grid>

     

    ...

     

     

    <ScrollViewer VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto" Grid.Row="1" Grid.Column="1">

     

     

     

        <telerikChart:RadChart x:Name="RadChart1" Background="Transparent"/>

     

     

     

    </ScrollViewer>

     

    </

     

    Grid>
    and in the code:

     

    RadChart1.Width = lstGraphItem.Count * 40 + 300;      // 300 - for Legend

    You will get the scrolling for all Chart Control, not only for ChartArea.

    Have a nice day
    :)
    Luda

  3. Dan
    Dan avatar
    11 posts
    Member since:
    Mar 2009

    Posted 28 Jul 2009 Link to this post

    Luda,
    Thanks!  This was helpful.  I swear i tried this and for some reason it was not working.  It is now, so thanks!

    Dan
  4. Luda
    Luda avatar
    2 posts
    Member since:
    Jan 2009

    Posted 28 Jul 2009 Link to this post

    Hi Dan,

    I believe you :) I played with it a lot too....
    I glad it help you

    :)
    Luda
Back to Top