Telerik SplineSeries wrong display value

Thread is closed for posting
2 posts, 0 answers
  1. Hai
    Hai avatar
    1 posts
    Member since:
    Jan 2016

    Posted 03 Jan 2016 Link to this post

    Hi Telerik,

    I've installed Telerik RadCartersianChart as following code:


    <telerik:RadCartesianChart x:Name="GrowthChart"
                                                   EmptyContent="Loading data "
                                                   FontSize="8" Foreground="#FFF7B11A" Grid.Row="1"
                                                   FontFamily="ms-appx:/Fonts/segoeuil.ttf#Segoe UI Light">
                                <Style x:Key="CustomAxisLineStyle" TargetType="Line">
                                    <Setter Property="Stroke" Value="{ThemeResource PhoneAccentBrush}" />
                                    <Setter Property="StrokeThickness" Value="1" />
                                <Style TargetType="Line" x:Key="StripLinesStyle">
                                    <Setter Property="Stroke" Value="DimGray" />
                                    <Setter Property="StrokeThickness" Value="1" />
                                    <Setter Property="Opacity" Value="0.1" />
                                <telerik:CartesianChartGrid MajorLinesVisibility="XY"
                                                            MajorYLineStyle="{StaticResource StripLinesStyle}"
                                                            MajorXLineStyle="{StaticResource StripLinesStyle}" />
                                <telerik:CategoricalAxis LineStyle="{StaticResource CustomAxisLineStyle}"
                                                         Foreground="{ThemeResource PhoneAccentBrush}" FontSize="9" />
                                <telerik:LinearAxis LineStyle="{StaticResource CustomAxisLineStyle}"
                                                    Foreground="{ThemeResource PhoneAccentBrush}" FontSize="9" />
                            <telerik:SplineSeries x:Name="Line5th"
                                                  ValueBinding="{StaticResource ValueBinding}"
                                                  CategoryBinding="{StaticResource CategoryBinding}"
                                                  CombineMode="Stack" Stroke="#FFA0CAE2" />


    And code Behind:


    1.Line5th.ItemsSource = await ChartGalleryModel.GetWhoCategoricalData(1, 5);

    It displayed and worked perfectly as the first picture attach.

    But I want more line. I added more Spline Line as example code:


    01.<telerik:SplineSeries x:Name="Line5th"
    02.                                              ValueBinding="{StaticResource ValueBinding}"
    03.                                              CategoryBinding="{StaticResource CategoryBinding}"
    04.                                              StrokeThickness="1"
    05.                                              CombineMode="Stack" Stroke="#FFA0CAE2" />
    07.                        <telerik:SplineSeries x:Name="Line10th"
    08.                                              ValueBinding="{StaticResource ValueBinding}"
    09.                                              CategoryBinding="{StaticResource CategoryBinding}"
    10.                                              StrokeThickness="1"
    11.                                              CombineMode="Stack" Stroke="#FFA0CAE2" />
    14.                        <telerik:SplineSeries x:Name="Line25th"
    15.                                              ValueBinding="{StaticResource ValueBinding}"
    16.                                              CategoryBinding="{StaticResource CategoryBinding}"
    17.                                              StrokeThickness="1"
    18.                                              CombineMode="Stack" Stroke="#FFA0CAE2" />

    And edit the code behind:

          Line5th.ItemsSource = await ChartGalleryModel.GetWhoCategoricalData(1, 5);
          Line10th.ItemsSource = await ChartGalleryModel.GetWhoCategoricalData(1, 10);
          Line25th.ItemsSource = await ChartGalleryModel.GetWhoCategoricalData(1, 25);

    All line displayed perfectly as i want they are. But there is a small problem with the data value (see 2nd image).

    All my data has no value larger than 20, but as I saw in chart, they larger than real value, why ?

    Thank you

  2. Ves
    Ves avatar
    2926 posts

    Posted 07 Jan 2016 Link to this post

    Hi Hai,

    Can you please show us the code for the ChartGalleryModel.GetWhoCategoricalData method? Thanks.

    Best regards,
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top