Hi Telerik,
I've installed Telerik RadCartersianChart as following code:
<
telerik:RadCartesianChart
x: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
>
<
Style
x:Key
=
"CustomAxisLineStyle"
TargetType
=
"Line"
>
<
Setter
Property
=
"Stroke"
Value
=
"{ThemeResource PhoneAccentBrush}"
/>
<
Setter
Property
=
"StrokeThickness"
Value
=
"1"
/>
</
Style
>
<
Style
TargetType
=
"Line"
x:Key
=
"StripLinesStyle"
>
<
Setter
Property
=
"Stroke"
Value
=
"DimGray"
/>
<
Setter
Property
=
"StrokeThickness"
Value
=
"1"
/>
<
Setter
Property
=
"Opacity"
Value
=
"0.1"
/>
</
Style
>
</
telerik:RadCartesianChart.Resources
>
<
telerik:RadCartesianChart.Grid
>
<
telerik:CartesianChartGrid
MajorLinesVisibility
=
"XY"
MajorYLineStyle
=
"{StaticResource StripLinesStyle}"
MajorXLineStyle
=
"{StaticResource StripLinesStyle}"
/>
</
telerik:RadCartesianChart.Grid
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:CategoricalAxis
LineStyle
=
"{StaticResource CustomAxisLineStyle}"
Foreground
=
"{ThemeResource PhoneAccentBrush}"
FontSize
=
"9"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
LineStyle
=
"{StaticResource CustomAxisLineStyle}"
Foreground
=
"{ThemeResource PhoneAccentBrush}"
FontSize
=
"9"
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:SplineSeries
x: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:SplineSeries
x:Name
=
"Line5th"
02.
ValueBinding
=
"{StaticResource ValueBinding}"
03.
CategoryBinding
=
"{StaticResource CategoryBinding}"
04.
StrokeThickness
=
"1"
05.
CombineMode
=
"Stack"
Stroke
=
"#FFA0CAE2"
/>
06.
07.
<
telerik:SplineSeries
x:Name
=
"Line10th"
08.
ValueBinding
=
"{StaticResource ValueBinding}"
09.
CategoryBinding
=
"{StaticResource CategoryBinding}"
10.
StrokeThickness
=
"1"
11.
CombineMode
=
"Stack"
Stroke
=
"#FFA0CAE2"
/>
12.
13.
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