This is a migrated thread and some comments may be shown as answers.

Line chart series and label alignment

1 Answer 111 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 03 Aug 2012, 02:42 PM
Hi

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.

Thanks

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 08 Aug 2012, 11:49 AM
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.

Regards,
Slav
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.
Tags
Chart (HTML5)
Asked by
Nick
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or