Chart improperly displaying > 200 points

3 posts, 0 answers
  1. Joel
    Joel avatar
    41 posts
    Member since:
    Nov 2010

    Posted 19 Mar 2012 Link to this post

    I have a chart which I use to display a single line which is broken up by null values and the drop gap behavior.  It works fine up to 200 points, but when I add 201 points, it displays a single continuous line across the full length of the chart.

    Here is my chart:

    <telerik:RadChart x:Name="videoChart" BorderThickness="0" Background="Transparent" MaxHeight="20" VerticalAlignment="Center">
                            <telerik:ChartArea Padding="0">
                                    <telerik:AxisX IsDateTime="True" AutoRange="False" Visibility="Collapsed"/>
                                    <telerik:AxisY AutoRange="False" MinValue=".99999" MaxValue="1.00001" Visibility="Collapsed" StripLinesVisibility="Collapsed"/>
                            <telerik:ChartLegend Visibility="Collapsed"/>
                            <telerik:ChartTitle Visibility="Collapsed"/>
                            <telerikCharting:LineSeriesDefinition ShowItemLabels="False" ShowPointMarks="False" EmptyPointBehavior="Gap">
                                    <telerikCharting:SeriesAppearanceSettings StrokeThickness="10" Stroke="Green"/>
                        <telerikCharting:ItemMapping FieldName="Value" DataPointMember="YValue"/>
                        <telerikCharting:ItemMapping FieldName="Date" DataPointMember="XValue"/>

    The data I'm putting into the chart doesn't seem to matter.  As soon as I hit 201, I get a solid, unbroken bar.

    Is there some kind of virtualization/averaging/etc going on?  Can I turn that off?

    The ChartView does not have a gap behavior yet, so I cannot use the ChartView. 

  2. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 20 Mar 2012 Link to this post

    Hello Joel,

    200 is the default sampling threshold used by RadChart ( -- you can disable data sampling by setting RadChart.SamplingSettings.SamplingThresold property to 0.

  3. Joel
    Joel avatar
    41 posts
    Member since:
    Nov 2010

    Posted 20 Mar 2012 Link to this post

    Thanks Bart, that was it.  For reference, here's what I had to add to the above chart:
        <telerik:SamplingSettings SamplingThreshold="0"/>

Back to Top