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. Image for the cookie policy date
close icon

How to set series to row programmatically?

How do I translate this

<Charts:SplineSeries.YAxis>
       <Charts:NumericalAxis Charts:SfChart.Row="1" PlotOffset="10" /> 
</Charts:ColumnSeries.YAxis>

to this

var splineSeries = new SplineSeries();
 
NumericalAxis na = new NumericalAxis();
na.PlotOffset = 10;
na. ??? What do I put here?
splineSeries.YAxis = na;
By the way, what is PlotOffset?

1 Reply

DA Devi Aruna Maharasi Murugan Syncfusion Team December 23, 2016 01:09 PM UTC

Hi Syaiful, 
  
Thanks for contacting Syncfuion Support. 
  
1)Setting Row in Code behind  
  
We can set the corresponding row for axis in SfChart, by using the SetRow Method of SfChart as like the below code snippet, 
            var spline = new SplineSeries(); 
            NumericalAxis axis = new NumericalAxis(); 
            axis.PlotOffset = 10; 
            SfChart.SetRow(axis, 1); 

  
2)Regarding PlotOffset, 
  
While setting the PlotOffset property of axis, the additional space will be padded on both the side of axis. Please refer the below code snippet and corresponding output  
 
        <chart:SfChart > 
            <chart:SfChart.PrimaryAxis> 
                <chart:NumericalAxis PlotOffset="30"/> 
            </chart:SfChart.PrimaryAxis> 
 
            <chart:SfChart.SecondaryAxis> 
                <chart:NumericalAxis /> 
            </chart:SfChart.SecondaryAxis> 
        </chart:SfChart> 

 
Regards, 
Devi 


Loader.
Live Chat Icon For mobile
Up arrow icon