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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Primary Y Axis display only integer value

Thread ID:

Created:

Updated:

Platform:

Replies:

118276 Feb 19,2015 04:17 AM UTC Feb 20,2015 01:54 PM UTC ASP.NET MVC 1
loading
Tags: Chart
Sutthipong
Asked On February 19, 2015 04:17 AM UTC

I want my chart to display value in y axis in integer value only.Is it possible to do?

Akbar Basha K M [Syncfusion]
Replied On February 20, 2015 01:54 PM UTC

 

Hi Sutthipong,

Thanks for using syncfusion product. We have analyzed your requirement and we like to inform you that, by default axis ranges are number with or without floating points.

Currently it is not possible directly to achieve your requirement.

As an alternate solution we can set the ranges for axis. The axis labels are displayed based on axis range. Axis range can be customized using min , max and intervals properties.

To display axis range as integer the interval property should be assigned a value such that the dividing the difference between min and max value will be an integer. Please refer the flowing code

<code>

@(Html.EJ().Chart("container")

 .PrimaryYAxis(pr=>pr.Range(ra=>ra.Max(100).Min(0).Interval(10)))

</code>

Alternately we can set the format the label property as “n0” to round the decimal part of the number to an integer,

<code>

@(Html.EJ().Chart("container")

.PrimaryYAxis(pr=>pr.Title(tl=>tl.Text("Efficiency")).LabelFormat("n0"))

</code>

we have prepared a sample based on setting labelFormat. Please find the sample under the following location.

Sample Location: http://www.syncfusion.com/downloads/support/directtrac/118276/MvcApplication19-99829037.zip

Please let us know if you have any concern.

Regards,

Akbar Basha KM



CONFIRMATION

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.

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

;