This is a migrated thread and some comments may be shown as answers.

Chart with lots of datapoints and horizontal scrolling

3 Answers 326 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 25 Jul 2009, 02:37 AM
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

3 Answers, 1 is accepted

Sort by
0
Luda
Top achievements
Rank 1
answered on 27 Jul 2009, 05:48 AM
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

0
Dan
Top achievements
Rank 1
answered on 28 Jul 2009, 12:51 PM
Luda,
Thanks!  This was helpful.  I swear i tried this and for some reason it was not working.  It is now, so thanks!

Dan
0
Luda
Top achievements
Rank 1
answered on 28 Jul 2009, 01:04 PM
Hi Dan,

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

:)
Luda
Tags
Chart
Asked by
Dan
Top achievements
Rank 1
Answers by
Luda
Top achievements
Rank 1
Dan
Top achievements
Rank 1
Share this question
or