This is a migrated thread and some comments may be shown as answers.

Unable to show data using Series Provider and ScatterSplineSeries

2 Answers 185 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Julio
Top achievements
Rank 1
Julio asked on 12 May 2017, 02:02 PM

Hello,

I am having difficulties in creating a RadCartesianChart Series Provider with a chart type of ScatterSplineSeries. In overview website (http://docs.telerik.com/devtools/silverlight/controls/radchartview/features/chartseriesprovider#overview), it states that to use ScatterSplineSeries, I need to use the ScatterSeriesDescriptor. But for some reason, the plot is not showing. I am just randomizing the data points in the viewmodel. If i remove the Style section, it is able to plot a Scatter Series. How do I go about to plot a Scatter Spline Series?

01.<telerik:RadCartesianChart Margin="10">
02. 
03.               <telerik:RadCartesianChart.HorizontalAxis>
04.                   <telerik:LinearAxis />
05.               </telerik:RadCartesianChart.HorizontalAxis>
06. 
07.               <telerik:RadCartesianChart.VerticalAxis>
08.                   <telerik:LinearAxis />
09.               </telerik:RadCartesianChart.VerticalAxis>
10. 
11.               <telerik:RadCartesianChart.SeriesProvider>
12.                   <telerik:ChartSeriesProvider Source="{Binding Data}">
13.                       <telerik:ChartSeriesProvider.SeriesDescriptors>
14. 
15.                           <telerik:ScatterSeriesDescriptor ItemsSourcePath="TransmitCharacterizationItems"
16.                                                            XValuePath="XValue"
17.                                                            YValuePath="YValue">
18. 
19.                               <telerik:ScatterSeriesDescriptor.Style>
20.                                   <Style TargetType="telerik:ScatterSplineSeries">
21.                                       <Setter Property="Stroke" Value="Blue" />
22.                                       <Setter Property="StrokeThickness" Value="1" />
23.                                   </Style>
24.                               </telerik:ScatterSeriesDescriptor.Style>
25. 
26.                           </telerik:ScatterSeriesDescriptor>
27.                       </telerik:ChartSeriesProvider.SeriesDescriptors>
28.                   </telerik:ChartSeriesProvider>
29.               </telerik:RadCartesianChart.SeriesProvider>
30.           </telerik:RadCartesianChart>

 

1.public class SeriesViewModel
2.    {
3.        public string SeriesType { get; set; }
4.        public ObservableCollection<TransmitDataItem> TransmitCharacterizationItems { get; set; }
5.    }

 

1.public class TransmitDataItem
2.    {
3.        public double XValue { get; set; }
4.        public double? YValue { get; set; }
5.    }

2 Answers, 1 is accepted

Sort by
0
Julio
Top achievements
Rank 1
answered on 15 May 2017, 12:27 PM

Spend to much time trying to find a simple answer, but lucklily I found it here: http://www.telerik.com/forums/categoricalseriesdescriptor-causes-chartview-failure#0Onp5xuIJkS5I1RbT562ZQ

Needed to add: BasedOn="{StaticResource ScatterSplineSeriesStyle}" in order to get it to work.

0
Dinko | Tech Support Engineer
Telerik team
answered on 16 May 2017, 09:16 AM
Hello Julio,

We are happy to hear that you have found a solution for your case. 

This behavior is expected if you are using NoXaml binaries in your application. When working with our NoXaml binaries and Implicit Styles you need to have in mind that your custom Styles that target our controls should be based on their default styles. You can do this by setting the BasedOn property of the custom Style. You can find more information in our Styling the Controls article.

Regards,
Dinko
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ChartView
Asked by
Julio
Top achievements
Rank 1
Answers by
Julio
Top achievements
Rank 1
Dinko | Tech Support Engineer
Telerik team
Share this question
or