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

TicksDistance for Dynamically Added Series

2 Answers 54 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Cyndie
Top achievements
Rank 1
Cyndie asked on 12 Nov 2010, 05:12 PM
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 Answers, 1 is accepted

Sort by
0
Cyndie
Top achievements
Rank 1
answered on 16 Nov 2010, 10:08 PM
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.
0
Ves
Telerik team
answered on 17 Nov 2010, 09:43 AM
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>>
Tags
Chart
Asked by
Cyndie
Top achievements
Rank 1
Answers by
Cyndie
Top achievements
Rank 1
Ves
Telerik team
Share this question
or