VISIBLOX, WPF: Getting chart points to scroll horizontally?
Asked Answered
D

3

13

I'm using the Visiblox WPF API and am having trouble getting the chart points in my line chart to scroll horizontally. Instead of scrolling, the points are get squashed together, in which, this isn't particularly a problem, except that I expect to have 100s of data points on the chart. I have looked throughout the examples available on the Visiblox website, but couldn't find what I was looking for. Ive attached an example screenshot.

Any ideas?

Thanks for your help, Sparky

Example

Decrepit answered 5/4, 2011 at 15:7 Comment(0)
A
8

By default Visiblox Charts will re-calculate the range to include all the data in the series, so there are two possible approaches: 1) when you add the last point, remove the first one which will effectively move the visible window one point over or 2) set an explicit axis range and update that when you want to move the visible window.

Check out the Visiblox blog for more details on how ranges work at: http://www.visiblox.com/blog/2011/03/visiblox-charts-ranges-demystified

Abirritant answered 6/4, 2011 at 7:1 Comment(0)
I
1

I just had something like this recently. Everytime I'd add a point to the cart I'd run a little section of code that would check the amount of time (my x-axis dimension) that had passed since 0. I also set up a range of data I always wanted to see. I always wanted to show 120 seconds of data on the graph. So I had something like this:

private void adjustXasis(int timeCount)
{
    if(timeCount>desiredRange)
    {
        chart.axis.Xaxis.minimum=timeCount-desiredRange;
        chart.axis.Xaxis.maximum=timeCount;
    }
    else //two minutes not reached yet
    {
        chart.axis.Xaxis.minimum=0;
        chart.axis.Xaxis.maximum=desiredRange;
    }           
}

I don't have VS in front of me and I know that syntax for the axis min/max is wrong but you get the idea.

Incursion answered 31/7, 2011 at 15:42 Comment(0)
M
0

By default Visiblox Charts will re-calculate the range to include all the data in the series, so there are two possible approaches: 1) when you add the last point, remove the first one which will effectively move the visible window one point over or 2) set an explicit axis range and update that when you want to move the visible window.

Check out the Visiblox blog for more details on how ranges work at: http://www.visiblox.com/blog/2011/03/visiblox-charts-ranges-demystified

Mayotte answered 25/11, 2011 at 8:36 Comment(1)
Um... plagiarize much?Moberg

© 2022 - 2024 — McMap. All rights reserved.