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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Bar chart axis labels rendering

Thread ID:





142408 Feb 1,2019 03:14 AM UTC Feb 1,2019 10:12 AM UTC ASP.NET MVC - EJ 2 1
Tags: Chart
Asked On February 1, 2019 03:14 AM UTC

Hi Team,

I am trying to build a bar chart and I pass maximum abd minimum value for primary Y axis from controller and I have set the sans properties in the chart as well. The maximum and minimum works well. However, there's no zero point on y Axis labels. Could you please  help me to render zero always in  y axis as one of the labels.


Dharanidharan Dharmasivam [Syncfusion]
Replied On February 1, 2019 10:12 AM UTC

Hi Jsu, 
Greetings from Syncfusion.  
We have analyzed your requirement. In general, when ranges (minimum, maximum) are not specified, then for the bar chart the minimum range will be calculated from zero only. In your scenario, you have specified ranges for y axis, so based on this ranges will be calculated. This is the current behavior. 
Also, we would like to let you know that, the axis labels text can be customized using the axislabelRender event. This event will be triggered for each axis label and can be customized based on your requirement. 
  .PrimaryYAxis(py => py.Minimum(2).Maximum(10) ) 
   Other configurations 
function labelRender(args) { 
        if (args.axis.orientation === "Horizontal" && args.axis.minimum === parseFloat(args.text)) { 
            args.text = "0"; 
Here we have set y axis minimum value as 2, but we have customized the text in event as depicted above. For more information axis labels customization, find the user guide. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon