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

Creating RadChart Programmatically

2 Answers 184 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Alberto
Top achievements
Rank 1
Alberto asked on 18 Sep 2013, 11:11 PM
I would like to know if there is some sample code to create a RadChart programmatically.

I only have this code in the xaml file:

<telerik:RadChart Content="RadChart" HorizontalAlignment="Left" Margin="10,455,0,10" Grid.Row="1" Width="791"/>

And I would like to create the series, configure the axes, bind the chart to a datatable where I have the data that I want to show, in the cs file.

Thanks,

Alberto

2 Answers, 1 is accepted

Sort by
0
Accepted
Petar Kirov
Telerik team
answered on 20 Sep 2013, 03:23 PM
Hi Alberto,

Currently we offer 2 charting solutions for the Silverlight platform - RadChart and RadChartView (represented by the classes RadCartesianChart, RadPieChart and RadPolarChart).
  • The RadChart  provides rich and mature functionality that covers a large spectrum of user case scenarios such as built-in support for grouping.
  • The RadChartView is the newer control which addresses many of the limitations and deficiencies that we have identified in the RadChart implementation over the years. It is easier to set up and has vastly improved performance.
  • For detailed comparison between the two controls, check this help topic.

Given the fact, that you are relatively new to our charting components for WPF/Silverlight, I will strongly recommend using RadChartView.

I have attached a sample project demonstrating programmatic chart creation. For an example of binding to a DataTable, you can check this help topic.
 
Regards,
Petar Kirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Alberto
Top achievements
Rank 1
answered on 20 Sep 2013, 10:41 PM
Hi Petar,

Thanks for the sample project it was very helpful, now I've managed to configure a cartesian chart using bar series.

Regards,

Alberto
Tags
Chart
Asked by
Alberto
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Alberto
Top achievements
Rank 1
Share this question
or