X -axis not getting interval 1 when exported to pdf

I have a graph which needs to plot 30 values in x axis. Even after setting interval to 1 then graph readjusts the x-axis based on the width available in screen.
The same graph needs to be exported to pdf. so that I need to show the entire data for export.
Is there any way we can plot the entire graph to pdf without plotting the graph in the view? 
If not is there any mechanism to adjust the frame of the chart to fit with all these values?
Can we redraw the plot to pdf rather than saving the view into pdf

1 Reply

DV Divya Venkatesan Syncfusion Team April 18, 2018 04:42 PM UTC

Hi Varun, 
 
Thanks for using Syncfusion products. 
 
The x axis will readjust based on the available screen width. You can show all the axis labels by setting the LabelsIntersectAction as MultipleRows mas shown in the below code snippets. 
 
Code snippets for LabelsIntersectAction[Xaml]: 
<chart:SfChart.PrimaryAxis > 
    <chart:NumericalAxis LabelsIntersectAction="MultipleRows"/> 
</chart:SfChart.PrimaryAxis > 
 
Code snippets for LabelsIntersectAction[C#]: 
Chart.PrimaryAxis = new NumericalAxis() 
{ 
    LabelsIntersectAction = AxisLabelsIntersectAction.MultipleRows 
}; 
 
Please refer the following user guide link to know more about LabelsIntersectAction 
 
We have prepared a sample for exporting chart to pdf by setting the chart size as pdf size as shown in the below code snippets which can be downloaded from the following link. 
 
Code snippets[C#]: 
document = new PdfDocument(); 
chart.WidthRequest = document.PageSettings.Width; 
chart.HeightRequest = document.PageSettings.Height; 
 
 
Please let us know if you need any further assistance. 
 
Regards, 
Divya Venkatesan 


Loader.
Up arrow icon