Articles in this section
Category / Section

What are the range padding options available in ASP.NET MVC Chart?

2 mins read

Essential ASP.NET MVC Chart supports different types of RangePadding options to avoid partial appearance of point and data labels near the left and right edges of the Chart area. The different types of padding options for the axis in Essential Chart are described as follows.

None

Axis range is calculated from the minimum value to the maximum value in DataSource.  None is the default value for the range padding.

CSHTML

@(Html.EJ().Chart("chart")
    .PrimaryXAxis(x=>x.RangePadding(ChartRangePadding.None))
    . . . . . . . . . . . .
 )

The screenshot displays the Chart with the range padding set to None.

The Chart with the range padding set to None

Figure 1: Range padding set to None

Normal

Axis range is calculated based on the numeric nice interval range calculation. This is applicable for numerical axis alone and is specifically used for Y-Axis in the Chart.

CSHTML

@(Html.EJ().Chart("chart")
    .PrimaryXAxis(x=>x.RangePadding(ChartRangePadding.Normal))
    . . . . . . . . . . . . . 
 )

The following screenshot displays the Chart with the range padding set to Normal The Chart with the range padding set to Normal

Figure 2: Range padding set to Normal

Additional

Axis range is calculated by adding the intervals to minimum and maximum values in the DataSource such that points near the left and right edges appear without getting cut.

CSHTML

@(Html.EJ().Chart("chart")
    .PrimaryXAxis(x=>x.RangePadding(ChartRangePadding.Additional))
    . . . . . . . . . .
 )

The following screenshot displays the Chart with the range padding set to Additional.

The Chart with the range padding set to Additional

Figure 3: Range padding set to Additional

Round

This rounds the axis range to the nearest possible value.

CSHTML

@(Html.EJ().Chart("chart")
    .PrimaryXAxis(x=>x.RangePadding(ChartRangePadding.Round))
    . . . . . . . . . .
 )

The following screenshot displays the Chart with the range padding set to Round.

The Chart with the range padding set to Round

Figure 4: Range padding set to  Round


Conclusion

I hope you enjoyed learning about what are the range padding options available in ASP.NET MVC Chart.

You can refer to our ASP.NET MVC Chart feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our ASP.NET MVC Chart example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied