RangeSeries Plots Incorrect Y Values with AutoRange="false"

3 posts, 0 answers
  1. Grant
    Grant avatar
    13 posts
    Member since:
    Oct 2011

    Posted 29 Nov 2011 Link to this post

    I am using a RangeSeries in a RadChart to plot a collection of objects. When I set the YAxis to AutoRange="false" and my data contains values that have a High value larger than the MaxValue of the Y-axis, the series data is skewed and not plotted correctly--in this case all data is plotted at the MaxValue instead of its actual value. 

    The set of data that is being plotted in my sample app is below. In the attached "RangeSeriesSetRange" image you'll see that the value for X=6 is at 100, thought it should be at 5000. 

    Here is the XAML for the RadChart that behaves incorrectly:
    <telerik:RadChart x:Name="MenuRadChart3" IsHitTestVisible="False" Background="Transparent" Width="490" Margin="18, 50,0,0" Height="260" HorizontalAlignment="Left" VerticalAlignment="Top">
        <telerik:RadChart.SeriesMappings>
            <telerik:SeriesMapping ChartAreaName="1">
                <telerik:SeriesMapping.SeriesDefinition>
                    <telerik:RangeSeriesDefinition ShowPointMarks="False" ShowItemLabels="False" ShowItemToolTips="False" />
                </telerik:SeriesMapping.SeriesDefinition>
                <telerik:SeriesMapping.ItemMappings>
                    <telerik:ItemMapping FieldName="TraceHigh" DataPointMember="High" />
                    <telerik:ItemMapping FieldName="TraceLow" DataPointMember="Low" />
                    <telerik:ItemMapping FieldName="X" DataPointMember="XValue" />
                </telerik:SeriesMapping.ItemMappings>
            </telerik:SeriesMapping>
        </telerik:RadChart.SeriesMappings>
        <telerik:RadChart.DefaultView>
            <telerik:ChartDefaultView>
                <telerik:ChartDefaultView.ChartArea>
                    <telerik:ChartArea NoDataString="Waiting for data..." EnableAnimations="False" >
                        <telerik:ChartArea.SeriesStyles>
                            <telerik:SeriesStyles/>
                        </telerik:ChartArea.SeriesStyles>
                        <telerik:ChartArea.Annotations>
                            <telerik:CustomGridLine Visibility="Collapsed"/>
                        </telerik:ChartArea.Annotations>
                        <telerik:ChartArea.AxisX>
                            <telerik:AxisX StripLinesVisibility="Collapsed" AutoRange="false" MaxValue="10" MinValue="0" Step="1">
                            </telerik:AxisX>
                        </telerik:ChartArea.AxisX>
                        <telerik:ChartArea.AxisY>
                            <telerik:AxisY StripLinesVisibility="Visible" AutoRange="False" MaxValue="100" MinValue="0" Step="10"/>
                        </telerik:ChartArea.AxisY>
                    </telerik:ChartArea>
                </telerik:ChartDefaultView.ChartArea>
                <telerik:ChartDefaultView.ChartLegend>
                    <telerik:ChartLegend Visibility="Collapsed" />
                </telerik:ChartDefaultView.ChartLegend>
                <telerik:ChartDefaultView.ChartTitle>
                    <telerik:ChartTitle Visibility="Collapsed" />
                </telerik:ChartDefaultView.ChartTitle>
            </telerik:ChartDefaultView>
        </telerik:RadChart.DefaultView>
    </telerik:RadChart>


    private void getUserCollection()
    {
        users.Add(new User { TraceHigh = 10, TraceLow = 0, });
        users.Add(new User { TraceHigh = 10, TraceLow = 0, });
        users.Add(new User { TraceHigh = 10, TraceLow = 0, X = 3 });
        users.Add(new User { TraceHigh = 10, TraceLow = 0, X = 4 });
        users.Add(new User { TraceHigh = 10, TraceLow = 0, X = 5});
        users.Add(new User { TraceHigh = 5000, TraceLow = 0, X = 6 });
        users.Add(new User { TraceHigh = 10, TraceLow = 0, X = 7 });
        users.Add(new User { TraceHigh = 10, TraceLow = 0, X = 8 });
        users.Add(new User { TraceHigh = 10, TraceLow = 0, X = 9 });
        users.Add(new User { TraceHigh = 10, TraceLow = 0, X = 10 });
    }

  2. Petar Marchev
    Admin
    Petar Marchev avatar
    1029 posts

    Posted 02 Dec 2011 Link to this post

    Hello Grant,

    Thank you for the attached screenshots and code, they were very helpful.

    I was able to reproduce the issue and to review the output. Please accept our apologies for the inconvenience caused, indeed there is a problem with the range series when the actual value is greater than the max value of the axis.

    I logged this as a bug in PITS where you can track its status and vote for it. I also updated your Telerik points for bringing the issue to our attention.

    The only thing we can suggest at this point is to use a scale that covers a range of all possible values that your data may contain.

    Greetings,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Grant
    Grant avatar
    13 posts
    Member since:
    Oct 2011

    Posted 02 Dec 2011 Link to this post

    Hi Petar--thanks for your reply. I will look forward to a fix for the issue.

    Grant
Back to Top