Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
XamDataChart common XAxis autoscaling increment size
posted

I am using the 2016.1 XamDataChart with the ImmediateLineSeries configuration (this uses the writable bitmap to speed up redraws for complex data). 

I am adding points to the plot data collection in real time, and wish to make this act like a stripchart that displays the last 200 points - but also allow stopping and zooming to look at any of the data that has been collected sofar. 

I found that as points are added to the collection and the ActualMaximumValue is hit, the collection is resized and the display rescales to show the new data + some extra space.  The amount of the resize depends on the existing size of the collection, and appears to be about a 10% increase each time. 

Rather than a percentage increment, what I would like is to use a fixed (say 200 points) increment on each resize (which makes the stripchart work great), but I cannot find any way to get access to do this.  Any suggestions on how to proceed here?

Thanks,

Gary

Parents
No Data
Reply
  • 34430
    Offline posted

    Hello Gary,

    Unfortunately, there currently does not exist a way to access the way that the "auto-interval" of the XamDataChart is calculated. It is, however, possible to set your own interval on the axes of the XamDataChart.

    Since you are using the custom ImmediateLineSeries solution, this means you are essentially utilizing a ScatterLineSeries with a custom renderer, meaning both axes will be numeric. Each numeric axis has a MinimumValue and MaximumValue property, as well as an Interval property for determining the first, last, and how frequent the labels are drawn. Perhaps you could keep an eye on your bound collection to your underlying ImmediateLineSeries.ItemsSource and increment the MinimumValue, MaximumValue, and Interval properties as it changes? Perhaps, if your underlying collection implements the INotifyCollectionChanged interface, you could do this in the CollectionChanged event of that collection.

    I'd like to know your thoughts on this, as I'm not entirely sure whether or not this approach would truly work for your scenario. Please let me know if I may be of further assistance on this matter.

    Sincerely,
    Andrew
    Associate Developer

Children