TickDistance and BarSeriesDefinition

2 posts, 1 answers
  1. Robin
    Robin avatar
    19 posts
    Member since:
    Feb 2011

    Posted 28 Apr 2011 Link to this post

    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
  2. Answer
    Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 03 May 2011 Link to this post

    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
Back to Top