Line chart series and label alignment

2 posts, 0 answers
  1. Nick
    Nick avatar
    10 posts
    Member since:
    Mar 2009

    Posted 03 Aug 2012 Link to this post


    I'm trying to left align the series lines and labels on a line chart up to the Y-axis but I can't figure out which properties I should be setting. I want the series lines and labels to appear like example 2 in my attachment but at the moment whichever values I change I seem to be stuck with example 1.

    Can anyone shed any light on which properties I should be setting on the chart to get this appearance.


  2. Slav
    Slav avatar
    1359 posts

    Posted 08 Aug 2012 Link to this post

    Hello Nick,

    The LineSeries of RadHtmlChart uses an X-axis based on categories. As a result the first series item will be positioned above the center of the first item in the X-axis so it is expected that the line is not starting from the Y-axis. To achieve the desired effect you need to use ScatterLineSeries instead of LineSeries as the X-axis of this series type is numerical. This will allow you to position the first series item at the beginning of the X-axis by setting its XValue to 0 by default or the crossing value of the X-axis if such is specified. You can check the suggested setup if you open the online demo Scatter Line Chart, expand the panel Charge 0.8C First Marker Settings in the configurator and set Item YValue to 0.

    Feel free to contact us again if you run into more difficulties.

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top