Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Telerik SplineSeries wrong display value

$
0
0

Hi Telerik,

I've installed Telerik RadCartersianChart as following code:

 

<telerik:RadCartesianChartx:Name="GrowthChart"
                                               Background="White"
                                               EmptyContent="Loading data "
 
                                               MaxZoom="2,2"
                                               FontSize="8"Foreground="#FFF7B11A"Grid.Row="1"
                                               FontFamily="ms-appx:/Fonts/segoeuil.ttf#Segoe UI Light">
                        <telerik:RadCartesianChart.Resources>
                            <Stylex:Key="CustomAxisLineStyle"TargetType="Line">
                                <SetterProperty="Stroke"Value="{ThemeResource PhoneAccentBrush}"/>
                                <SetterProperty="StrokeThickness"Value="1"/>
                            </Style>
                            <StyleTargetType="Line"x:Key="StripLinesStyle">
                                <SetterProperty="Stroke"Value="DimGray"/>
                                <SetterProperty="StrokeThickness"Value="1"/>
                                <SetterProperty="Opacity"Value="0.1"/>
                            </Style>
 
                        </telerik:RadCartesianChart.Resources>
 
 
                        <telerik:RadCartesianChart.Grid>
                            <telerik:CartesianChartGridMajorLinesVisibility="XY"
                                                        MajorYLineStyle="{StaticResource StripLinesStyle}"
                                                        MajorXLineStyle="{StaticResource StripLinesStyle}"/>
                        </telerik:RadCartesianChart.Grid>
 
 
                        <telerik:RadCartesianChart.HorizontalAxis>
                            <telerik:CategoricalAxisLineStyle="{StaticResource CustomAxisLineStyle}"
                                                     Foreground="{ThemeResource PhoneAccentBrush}"FontSize="9"/>
                        </telerik:RadCartesianChart.HorizontalAxis>
 
 
                        <telerik:RadCartesianChart.VerticalAxis>
                            <telerik:LinearAxisLineStyle="{StaticResource CustomAxisLineStyle}"
                                                Foreground="{ThemeResource PhoneAccentBrush}"FontSize="9"/>
                        </telerik:RadCartesianChart.VerticalAxis>
 
 
                        <telerik:SplineSeriesx:Name="Line5th"
                                              ValueBinding="{StaticResource ValueBinding}"
                                              CategoryBinding="{StaticResource CategoryBinding}"
                                              StrokeThickness="1"
                                              CombineMode="Stack"Stroke="#FFA0CAE2"/>
 
                        
 
                    </telerik:RadCartesianChart>

 

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:SplineSeriesx:Name="Line5th"
02.                                              ValueBinding="{StaticResource ValueBinding}"
03.                                              CategoryBinding="{StaticResource CategoryBinding}"
04.                                              StrokeThickness="1"
05.                                              CombineMode="Stack"Stroke="#FFA0CAE2"/>
06. 
07.                        <telerik:SplineSeriesx:Name="Line10th"
08.                                              ValueBinding="{StaticResource ValueBinding}"
09.                                              CategoryBinding="{StaticResource CategoryBinding}"
10.                                              StrokeThickness="1"
11.                                              CombineMode="Stack"Stroke="#FFA0CAE2"/>
12. 
13. 
14.                        <telerik:SplineSeriesx: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


Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>