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

TickDistance and BarSeriesDefinition

1 Answer 22 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Robin
Top achievements
Rank 1
Robin asked on 28 Apr 2011, 01:43 PM
Hi there,

I have the following problem:

Using a RadChart with 3 SeriesDefinitions (2 Lines and 1 Bar).
X axis is DateTime (ToOADate) and Y axis are Double values.

I'm a trying to optimize the visualization of the X axis lables (there can be many labels, because there are 10 minutes values).

The definition of the X axis:

ProfitChart.DefaultView.ChartArea.AxisX.MajorGridLinesVisibility = Visibility.Visible;
ProfitChart.DefaultView.ChartArea.AxisX.IsDateTime = true;
ProfitChart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "t";
ProfitChart.DefaultView.ChartArea.AxisX.LabelRotationAngle = 45.0;
ProfitChart.DefaultView.ChartArea.AxisX.LabelStep = 1;
ProfitChart.DefaultView.ChartArea.AxisX.Step = 2.0;
ProfitChart.DefaultView.ChartArea.AxisX.TicksDistance = 25;

So far so good.
But I don't understand the behaviors when I stretch the RadChart horizontal.

See the screenshots.

The single bars are thinner than before.
It looks not really nice ;-)

Hope you can help me
Thanks in advance

Robin

1 Answer, 1 is accepted

Sort by
0
Accepted
Evgenia
Telerik team
answered on 03 May 2011, 11:54 AM
Hello Robin,

The bars are becoming thinner because the TicksDistance property you have set is too big. This property allows you to specify at least how many pixels you want to have between two ticks. This causes the Bars to become smaller so that they fit their exact XValue. What I can suggest is that you set ItemWidthPercent for the Bars instead of using TicksDistance property or just decrease the value of the TicksDistance.
For more information about the ItemWidthPercent please take a look at our help article.

All the best,
Evgenia
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
Robin
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or