MajorStep Question

4 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 28 Mar 2012 Link to this post

    I have the following set on my chart:

    <telerikChart:RadCartesianChart.HorizontalAxis>
        <telerikChart:DateTimeContinuousAxis x:Name="xAxis"
                                        MajorStepUnit="Day"
                                        MajorStep="1"
                                        LabelInterval="1"
                                        LabelFormat="dd.MM"                                                                                                    
                                        PlotMode="OnTicks" LabelFitMode="Rotate" />
        <!--    Minimum="{Binding XMinimum}"   
            Maximum="{Binding XMaximum}"
            MajorStep="{Binding XMajorStep}"
            -->
    </telerikChart:RadCartesianChart.HorizontalAxis>
    From this Setting I would expect labels with one per day.
    Instead I get two labels per day.
    When I set MajorStep to 2 I get what I want.

    My question - am I doing something wrong? Is this "normal"?
    And if it is normal - do I always have to MajorStep to "wanted + 1" - or "wanted time 2"?

    Manfred

  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 02 Apr 2012 Link to this post

    Hi Manfred,

    Thanks for the question.
    Please post the data set with which you are populating the chart since I could not reproduce the described behavior. I tested the sample Horizontal axis that you sent and it looks ok, there is one label per tick per day. Please see attachment.

    I am looking forward to your reply.

    All the best,
    Victor
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 18 Apr 2012 Link to this post

    Hi Victor,

    sorry for the dealy.

    Here is some sample data with the Y-Value in the first column and the DateTime values in the second.

    94  01.11.2011 00:35:00
    95  11.03.2012 16:15:00
    96  16.03.2012 11:45:00
    96,5    19.03.2012 12:00:00
    94,5    22.03.2012 18:30:00
    93,5    23.03.2012 10:15:00
    88  16.03.2012 11:45:00
  5. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 23 Apr 2012 Link to this post

    Hello Manfred,

    Thanks for the data.
    The chart still acts as expected with the xaml and the data you provided. One label is generated for each day. I should note that I have excluded the data item with date 01.11.2011 because it causes the chart to generate too many days and the labels get squished together making it impossible to discern whether the days are correctly generated. (I have attached the app.)

    There must be some information that I am missing. Is it possible for you to directly send your project, this way I will be able directly debug it and see whether something is amiss.

    I am looking forward to your reply.

    All the best,
    Victor
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top