RadChart shows wrong YValue. Does radchart resample YValues for a threshold ???

2 posts, 0 answers
  1. Nurali
    Nurali avatar
    16 posts
    Member since:
    Oct 2010

    Posted 04 Dec 2013 Link to this post

    Hello,
    I have a RadChart control.  I would like to draw some important values.
    I fixed X Axis range 0-720, And Y Axis range 0-240. The AutoRange properties are false.
    I collect the ItemsSource data from a device. I think when I get some data over ~144 point RadChart re-samples the YValues and chart draws wrong(or rounded) values for me. And re-sampling  goes on while data come from my source. My Y axis values getting smaller !?

    I use LineSeriesDefinition . I do not won't something like anti-aliasing, smoothing. Can it be a kind of chart issue ? 

    I can see that I have "161" value as maximum(peak) YValue for my source and see it first. But when new values come I can see all values moved under 150 .  re-sampling done ??? Why my YValues getting smaller although my bound values still contains higher values such as 161. 

     <telerik:RadChart  x:Name="xRadChartECG1"  Grid.Column="1" ItemsSource="{Binding xSource}">
                                            <telerik:RadChart.DefaultView>
                                                <telerik:ChartDefaultView>
                                                    <telerik:ChartDefaultView.ChartLegend>
                                                        <telerik:ChartLegend Visibility="Collapsed" />
                                                    </telerik:ChartDefaultView.ChartLegend>
                                                    <telerik:ChartDefaultView.ChartArea>
                                                        <telerik:ChartArea  EnableAnimations="False" LabelFormatBehavior="None" SmartLabelsEnabled="False" Background="White" >
                                                            <telerik:ChartArea.AxisY>
                                                                <telerik:AxisY AutoRange="False" MinValue="0" MaxValue="260"  AxisLabelsVisibility="Visible" StripLinesVisibility="Hidden" MinorTicksVisibility="Visible" MajorTicksVisibility="Visible" Visibility="Visible" />
                                                            </telerik:ChartArea.AxisY>
                                                            <telerik:ChartArea.AxisX >
                                                                <telerik:AxisX  IsDateTime="False" AxisLabelsVisibility="Visible" MajorTicksVisibility="Visible" Visibility="Visible" AutoRange="False" MinValue="0" MaxValue="720" />
                                                            </telerik:ChartArea.AxisX>
                                                            <telerik:ChartArea.ZoomScrollSettingsX>
                                                                <telerik:ZoomScrollSettings ScrollMode="None" />
                                                            </telerik:ChartArea.ZoomScrollSettingsX>
                                                        </telerik:ChartArea>
                                                    </telerik:ChartDefaultView.ChartArea>
                                                </telerik:ChartDefaultView>
                                            </telerik:RadChart.DefaultView>
                                            <telerik:RadChart.SeriesMappings>
                                                <telerik:SeriesMapping>
                                                    <telerik:SeriesMapping.SeriesDefinition>
                                                        <telerik:LineSeriesDefinition ShowPointMarks="False" ShowItemLabels="False">
                                                            <telerik:LineSeriesDefinition.Appearance>
                                                                <telerik:SeriesAppearanceSettings Fill="Green" Foreground="Green" Stroke="Green" StrokeThickness="1" />
                                                            </telerik:LineSeriesDefinition.Appearance>
                                                        </telerik:LineSeriesDefinition>
                                                    </telerik:SeriesMapping.SeriesDefinition>
                                                    <telerik:SeriesMapping.ItemMappings>
                                                        <telerik:ItemMapping FieldName="YValue"
                                                 DataPointMember="YValue" />                                                  
                                                        <telerik:ItemMapping FieldName="Index"
                                                 DataPointMember="XValue" />
                                                    </telerik:SeriesMapping.ItemMappings>
                                                </telerik:SeriesMapping>
                                            </telerik:RadChart.SeriesMappings>
                                        </telerik:RadChart>
                                    </Grid>

    And the xSource is the below values . (same values comes for 10 times)

    128
    124
    119
    118
    118
    118
    119
    119
    119
    119
    119
    119
    119
    120
    120
    120
    120
    120
    120
    120
    120
    121
    121
    121
    121
    121
    121
    121
    121
    121
    121
    121
    121
    123
    127
    128
    127
    123
    121
    121
    121
    121
    121
    121
    121
    118
    131
    157
    161
    121
    114
    120
    119
    119
    120
    120
    120
    120
    120
    120
    120
    120
    121
    124
    127
    128
    129
    130
    131
    132
    132

    Thanks in advance
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 09 Dec 2013 Link to this post

    Hi Nurali,

    The old RadChart control has a built-in sampling threshold of 200. You can disable sampling by setting the threshold to 0, like this: this.radChart1.SamplingSettings.SamplingThreshold = 0.

    We generally suggest that you do not use the old RadChart but the new RadChartView instead. The new control has a much better performance, it is generally more flexible and is easy to set up.

    Regards,
    Petar Marchev
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top