RadChart AxisX Label AutoStep misfunctionality

3 posts, 0 answers
  1. Hıncal
    Hıncal avatar
    9 posts
    Member since:
    Aug 2010

    Posted 07 Oct 2010 Link to this post

    Hi,

    I'm trying to use RadChart with VS2010, SL4. Everything works fine but when I try to generate chart with 539 items according to date then radchart doesn't show the labels auto stepped. You may see it from the picture.

    I set

    RadChart_main.DefaultView.ChartArea.AxisX.AutoRange = true;

    RadChart_main.DefaultView.ChartArea.AxisX.DefaultLabelFormat =

     

    "dd/MM HH:mm";

     

    RadChart_main.DefaultView.ChartArea.AxisX.StepLabelLevelCount = 2;

     

     

     

    Anyone has any idea why it's not automatically arranged?
    And also this code works fine in VS2008, SL3.

  2. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 11 Oct 2010 Link to this post

    Hello Hıncal,

    I was able to reproduce your scenario in VS 2010 with SL version 4 and everything works fine to me.
    You can find my example attached.
    As I see from your picture X axis labels are overlapping and are hardly to read. What I suggest you is to rotate the axis labels to 90 degrees for example and set Layout Mode property to Inside so that ticks match labels. For more information about these properties take a look at our help topic  - http://www.telerik.com/help/silverlight/radchart-features-axes-x-axis.html.
    Here is how you can set the mentioned values to the properties:

    RadChart1.DefaultView.ChartArea.AxisX.LabelRotationAngle = 90;
    RadChart1.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Inside;

    Besides if you are using XValue property to set X axis values the RadChart will automatically calculate how much of the values to show. You can find more information about this property in our help articles - http://www.telerik.com/help/silverlight/radchart-populating-with-data-creating-chart-in-code-behind.html and http://www.telerik.com/help/silverlight/radchart-getting-started-create-a-line-chart-with-static-data.html.

    I hope this helps.

    Greetings,
    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
  3. Hıncal
    Hıncal avatar
    9 posts
    Member since:
    Aug 2010

    Posted 12 Oct 2010 Link to this post

    Hey I found my problem..
    I'm using Vlad's datatable in VS2008 and binding chart with that DataTable. I'm trying to do samething with same data in Vlad's DataTable with VS2010. But somehow date values mixes all chart. If I create a List of classes and fill them with DataTable's values then I bind it to my chart, it works fine.

    Anyway I'm on it. If I find a solution I'll post it ;o))
Back to Top