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

Line Series Scale/Step (?)

1 Answer 59 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Jim Jackson
Top achievements
Rank 1
Jim Jackson asked on 22 Apr 2010, 02:47 AM
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?

1 Answer, 1 is accepted

Sort by
0
Velin
Telerik team
answered on 27 Apr 2010, 09:58 AM
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,
Velin
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.
Tags
Chart
Asked by
Jim Jackson
Top achievements
Rank 1
Answers by
Velin
Telerik team
Share this question
or