We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Create by code

Thread ID:





123588 Apr 1,2016 11:24 AM UTC Apr 6,2016 05:05 AM UTC UWP 3
Tags: SfChart
Asked On April 1, 2016 11:24 AM UTC

I am trying to create a series of charts by code depending of the number of data I have. I have a chart in my xaml, created like this:

<Grid x:Name="Grid_graph">
                                <chart:CategoryAxis Header="Horas" FontSize="14"></chart:CategoryAxis>
                                <chart:NumericalAxis Header="Valores" FontSize="14"></chart:NumericalAxis>
                            <chart:LineSeries XBindingPath="Hour" YBindingPath="Value1" ItemsSource="{Binding powerInd}"></chart:LineSeries>

I want to create the grid (which I already did) and add the datacontext(done) and the "chartSfChart" to include primary/seconday axis and line series. Is it possible? Could I have a line with an example?

Samuel Rajadurai Edwin Rajamanickam [Syncfusion]
Replied On April 4, 2016 12:18 PM UTC

Hi Pablo,

Thanks for contacting Syncfusion Support.


We have prepared sample to demonstrate how to create a SfChart in code behind. Please find the sample from the below location.



Please refer the below documentation link for more reference.




Replied On April 5, 2016 07:49 AM UTC

Thank you. That is what I was looking for. I already implemented it. 

Sumathi Jayaraj [Syncfusion]
Replied On April 6, 2016 05:05 AM UTC

Hi Pablo,

Thanks for the update. Please let us know if you have any queries.

Sumathi J


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon