How to add a buffer between top and bottom of graph on scatter chart

Hello,

I was wondering if there was a way to add a buffer between the top of the graph and the highest point and the bottom of the graph and the lowest point. Currently the maximum value is being auto set to the largest value point and the min value is set to the lowest value point.

I would like to be able to set the max to 5 to 10 units above the largest value point and the min 5 to 10 units below the lowest value point.

I am including a picture of what I am talking about. The points sit on the very top and bottom of the graph and I do not want that.

Thanks,

David


Attachment: Chart_Issue_Pic_dcf04082.zip

1 Reply

YP Yuvaraj Palanisamy Syncfusion Team August 9, 2021 07:11 AM UTC

Hi David Bauer, 

Greetings from Syncfusion. 

We would like to let know that the requirement “Extend the range of axis” has been achieved by using the following ways. Please find the code example below. 

Solution1: Use PlotOffset property of Chart Axis. 

You can add additional range for both start and end of range by pixel. 

Solution 2: Use RangePadding property of NumericalAxis and DateTimeAxis 
 
Which is used to extend the range based on the interval of axis. 
Solution 3: Use Minimum and Maximum property of axis. 
 
If you are known the axis range predefined, you can customize the range of axis by using Minimum and Maximum property. 
 
Please find the code example below. 

CodeSnippet: 
<chart:SfChart.PrimaryAxis> 
    <chart:CategoryAxis ArrangeByIndex="False" PlotOffset="10"
        <chart:CategoryAxis.Title> 
            <chart:ChartAxisTitle Text="CategoryAxis"/> 
        </chart:CategoryAxis.Title> 
    </chart:CategoryAxis> 
</chart:SfChart.PrimaryAxis> 

<chart:SfChart.SecondaryAxis> 
    <chart:NumericalAxis RangePadding="Additional" /> 
</chart:SfChart.SecondaryAxis> 

Also, we have attached the sample for your reference. Please find the sample from the below  link. 

  
Output
 

For more details, please refer the below link 

Regards, 
Yuvaraj. 


Loader.
Up arrow icon