This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I have created a chart containing a SplineSeries. The dataset consists of x values which are datetime and y values which are doubles. On the X-axis, I have set ValueConverter to a staticresource of type DateTimeAxisValueConverter - this works fine (apart from a few issues that I will mention in a different post). In Blend, I changed to MajorTickSpacing property to 20, to see if it was possible to declutter the labels along the bottom (I only really need 6hr intervals). Blend is now maxing out one of my processor cores and has been for quite a while now. I then tried the same change in Visual Studio and this now has full control of one of my other cores! Other info that might be useful: Data series has about 6 points, ranging over about 36 hours. I'm using the official release 1.0 dlls, haven't tried the nightly. Machine is x64. Cheers, Carl |
|
|
Hello and thanks for the feedback What ever object you plot against an axis, the axis will always manage a number range at its core. The DateTimeAxisValueConverter converts the DateTime objects plotted along an axis into a number range that the axis can interpret. This is done simply by using the DateTime.Ticks property which allows any precision of DateTime value to be used. In your case of 36 hours, the number range is at least in the millions. This means a tick spacing of 20 is rather small, and the axis will try to plot millions of tick marks and axis labels - thus maxing out the CPU. I will work on putting guards against this behaviour in the near future. So to solve this, there are a couple of things you can do. In the latest nightly build there is a nifty little feature that automatically hides some of the labels if they are overlapping. This will help to declutter the labels. The latest nightly build can be downloaded from here: http://assets.mindscape.co.nz/Trial/Nightlies/20110417/PhoneElementsTrial-20110417.msi If this still doesn't produce the desired results and you want control over the exact tick spacing, then you could use a larger tick spacing, equivalent to 6 hours or so. To do this, you could create a TimeSpan of 6 hours, and use the Ticks value to set the major tick spacing. Regards |
|
|
Note: retail nightlies can be downloaded from the store - go to https://www.mindscapehq.com/store/myaccount and choose Get Files. |
|
|
Thanks for the response, I'll give that a go. I guess it's pretty obvious that you would use ticks as the range, but it was Friday and I wanted to go home! Cheers, Carl |
|