TicksDistance for Dynamically Added Series

3 posts, 0 answers
  1. Cyndie
    Cyndie avatar
    114 posts
    Member since:
    Jul 2010

    Posted 12 Nov 2010 Link to this post

    I have the AxisX AutoRange set to true and TicksDistance set to 15 (via code behind) for a chart that I'm dynamically adding one or more series to.  All other formatting that I've set for AxisX, like the label format, works fine, but the TicksDistance doesn't seem to do anything and all of labels are pushed up against each other when there are a lot of values.  I don't wan't to specifiy a step because the number of values can change.  Is there anything special that I need to do to get TicksDistance to work dynamically?  Is there a way to refresh the AutoRange?

    I'm using 2010.3.110 version of RadControls for Silverlight 4.

    Thanks.
  2. Cyndie
    Cyndie avatar
    114 posts
    Member since:
    Jul 2010

    Posted 16 Nov 2010 Link to this post

    I did not have the dates in my XAxis converted to OADate because they were displaying fine, but I tried changing it and the TicksDistance started working.  I suppose the AutoRange calculation depends on the XAxis value being a double.  Hopefully, this helps someone else if they run into the same thing.

    Thanks.
  3. Ves
    Admin
    Ves avatar
    2927 posts

    Posted 17 Nov 2010 Link to this post

    Hi Cyndie,

    Just a small clarification here --  the AutoRange calculations for AxisX do take into account whether DateTime or double values are displayed, but that should not mess with TicksDistance functionality. I have attached a small example, showing how TicksDistance work for me, no explicit OLEAutomation date conversion. Let me know if there is anything specific in your scenario.

    One final note here -- a value of 15 seems too small to me, you would still get a crowded X axis. The attached example uses this value, but you can see the difference when changing it to 100 (the default value is 50). You can resize the window to see how ticks are configured for different chart width and with different values for TicksDistance.

    Best regards,
    Ves
    the Telerik team
    See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
Back to Top