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

Constant width for plot area

How to set the width of the plot-area (Chart area) in a SFChart?

3 Replies

SA Santhiya Arulsamy Syncfusion Team October 27, 2016 10:30 AM UTC

 Hi Ndongo,

Thanks for contacting Syncfusion Support.

The size applied for the ChartArea based on the SfChart size (height and width). So, we are unable to set the size directly for Chart Area (plot area). In order to set the size for chart area you can use Height and Width property for SfChart.


Santhiya A 

ND Ndongo October 27, 2016 05:35 PM UTC

Hello Santhiya

Thank you for the answer. However, the size of the plot area changes depending on the data which are Display and this means that the Alignment on the left side also changes depending on the width of the Y axis Label. I would like to have a freezed size for the plot. This only works when I set the Y axis to be collapsed.

Please advice.

Thank you

SS Sheik Syed Abthaheer M Syncfusion Team October 28, 2016 03:06 PM UTC

Hi Ndongo,

Thanks for your update.

We can freeze the chart area size from dynamic axis label by using LabelExtent property of chart axis. The axis label panel will take LabelExtent value as its available width when axis labels width is lesser than. We have to set approximate width size for axis as in below code snippet.


         <chart:NumericalAxis  LabelExtent="100"/> 

We have prepared the sample based on this. Please find the sample below

Sample: LabelExtent 
M. Sheik

Live Chat Icon For mobile
Up arrow icon