Line Series Scale/Step (?)

2 posts, 0 answers
  1. Jim Jackson
    Jim Jackson avatar
    3 posts
    Member since:
    Mar 2010

    Posted 21 Apr 2010 Link to this post

    I have small craft flight data that I would like to display on a chart. The series looks something like this (where x is kilometers distance and y is kilometers altitude):

    x=0, y=0
    x=1, y=.5
    x=2, y=.905
    x=4, y=1.4
    x=5, y=2.1
    x=6, y=2.00

    So as the plane travels 1, 2, 3 etc kilometers on its trip I want to show the altitude also in kilometers. It's important that the scale (or step?) of the x axis is the same as the y axis so that the actual angles of ascent or descent are displayed.

    I've played with AutoRange, Step, MinValue and MaxValue but the chart always appears exactly the same. I cannot get the two axis to layout at the same scale and I cannot get the horizontal axis to be wider than the screen (ZoomScrollSettingsX.ScrollMOde is set to ScrollMode.ScrollOnly).

    Any tips?
  2. Velin
    Velin avatar
    391 posts

    Posted 27 Apr 2010 Link to this post

    Hi Jim Jackson,

    This scenario is not natively supported by the control and you will need to adjust the size of the ChartArea depending on the data that is being shown. Here are the steps:
    1. Use custom layout for the chart control by setting RadChart.UseDefaultLayout = false and add custom chart area wrapped into a ScrollViewer.
    2. Set Axis.AutoRange = false for both AxisX and AxisY and provide a range depending on the data.
    3. Set fixed size to the axis labels for both AxisX and Axis Y labels by serring the Axis.AxisStyles.ItemLabelStyle property for both axes.

    Please, find  attached a small project.

    Hope this will help.
    Sincerely yours,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top