Creating RadChart Programmatically

3 posts, 1 answers
  1. Alberto
    Alberto avatar
    26 posts
    Member since:
    Nov 2012

    Posted 18 Sep 2013 Link to this post

    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. Answer
    Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 20 Sep 2013 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Alberto
    Alberto avatar
    26 posts
    Member since:
    Nov 2012

    Posted 20 Sep 2013 Link to this post

    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
Back to Top