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 there We are building a chart that displays stacked data series spread over a month period. Data sample frequency could vary from 5 minutes to one day. The problem we are facing is that the chart control seems to "remember" XAxis formatting from run to run. If the StackedBarSeries is initially populated with daily samples we see a nice chunky bar graph with each bar occupying one day on X Axis. However if the series was initially populated with 5-minute samples and then populated with the daily ones, the daily bars are tiny - 5 minute width. The ItemSource of StackedBarSeries is set to null prior to each run. Calling UpdateLayout doesn't help either. I put together a small sample to illustrate the issue. When you run the sample click Day and then Minute button. Observe correct behaviour. Press Minute button and then Day button - observe different behaviour. On a side note - we are charting "only" 10K samples and the performance is not that great, far less than the example from your Large Data Set demo. Also observe how the chart is displayed in this case - one wide bar is displayed first, stays on for a while and then the rest of the data appears. And after a number of runs the display becomes corrupt. We are using WpfElements nightly build from approximately a week ago - after performance improvements were implemented. The WpfElements assembly version is 5.0.1044.20359 What are we doug wrong? How can we reset XAxis formatting between the runs? And if you coud also suggest the way to improve the performance it would be great. Thank you Boris XAML
Code Behind: using System; using System.Collections.Generic; using System.Windows; using Mindscape.WpfElements.Charting; namespace WpfApplication1
{
///
} |
|
|
Hello Boris Thanks for pointing out this issue. I have fixed this now and you can get the update through the next nightly build. Now pressing the Minute button and then the Day button causes the bars to have the correct width. As for the performance, we haven't finished all performance enhancements yet. We can still greatly improve the performance of StackedBarSeries. Rather than it rendering all 10K points, it will only render a suitable sample of this. Then zooming in will reveal more data points as space becomes available for them. So far I've implemented this in the standard BarSeries which worked out great. This mechanism already exists in all line and area series which is why they run much faster. This is scheduled to be implemented for the StackedBarSeries in 2 days. Sorry about the wait. Jason Fauchelle |
|
|
Hello Boris I also recommend you use a DateTimeAxisValueConverter. To do this, simply create an instance of the DateTimeAxisValueConverter in xaml, and use this to set the ValueConverter property of the X Axis. Doing this will help to improve the performance. By default this is not set because using DateTimeDoubles without the value converter still works. Without the converter, the axis simply maps DateTime objects to consecutive numerical plotting positions which in most cases is good enough. For larger amounts of data, or data that has inconsistent time differences between consecutive data points, it's best to use the DateTimeAxisValueConverter. This activates a couple of performance enhancements that are not yet supported when using the DateTime mapping. Note that you'll still need the up coming performance improvements for StackedBarSeries to achieve the best results. Regards Jason Fauchelle |
|
|
Hello Boris The performance enhancements for StackedBarSeries that I described will be available in the next nightly build. This will be available in about 10 hours from now which you can download from your account page: http://www.mindscapehq.com/store/myaccount. Jason Fauchelle |
|
|
Hi Jason Thank you for the performance enhancements. It is phenomenal! lightning fast. However XAxis formatting is not quite there yet. I'm not sure if i need to start another forum thread but there are two more problems:
Thank you Boris |
|
|
Hi Jason Thank you for the performance enhancements. It is phenomenal! lightning fast. However XAxis formatting is not quite there yet. I'm not sure if i need to start another forum thread but there are two more problems:
Thank you Boris |
|
|
Re: Point 2 - found an issue - totally my fault. I apologise for the confusion Thank You Boris |
|
|
Re: Point 2 - found an issue - totally my fault. I apologise for the confusion Thank You Boris |
|
|
Hello Boris We will be looking into this issue soon. Jason Fauchelle |
|
|
Hello Boris Sorry for the wait. The best way to resolve this issue is to set the ValueConverter property of the X axis to be an instance of the DateTimeAxisValueConverter. You can do this right now, no need to download a nightly build this time. Jason Fauchelle |
|