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

Fix chart first point to origine

Thread ID:





129798 Apr 4,2017 09:20 AM UTC Apr 5,2017 01:39 PM UTC ASP.NET MVC 1
Tags: Chart
Selem Charfi
Asked On April 4, 2017 09:20 AM UTC

I am using a Chart Control into Asp MVC project (column type)
I would like that the first point will be drawn at the origin point.
I look at internet and the only solution is to used DateTime lable on XAxis.
Actually, my X Axis type is not date time (I have to use string type).

Dharanidharan Dharmasivam [Syncfusion]
Replied On April 5, 2017 01:39 PM UTC

Hi Selem, 

Thanks for contacting Syncfusion support. 

We have analyzed your query. We would like to let you know that, in our previous releases, the column series (first and last point) get clipped and rendered, but this is not the correct behavior, actually the column has to visible fully, so we have added the interval with start and end points by inbuild and now the column will not be clipped. This is the current behavior of our chart control. 

Also your requirement can be achieved as workaround. Render the chart in numeric axis and by using AxesLabelRendering event, the text of the PrimaryXAxis can be changed and also you need to specify the range for PrimaryXAxis to render chart from origin, as depicted in the below code snippet. 


        .PrimaryXAxis(pr => pr.Range(ra => ra.Max(7).Min(1).Interval(1)).ValueType(AxisValueType.Double)) 
function labelRender(sender) { 
        var xLabel = ["USA", "China", "Japan", "Australia", "France", "Germany", "Italy", "Sweden"] 
        if (sender.data.axis.orientation == "horizontal") { 
            window.count = ej.util.isNullOrUndefined(window.count) ? 0 : window.count + 1; 
            sender.data.label.Text = xLabel[window.count]; 

Sample for reference can be find from below link. 


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