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
115
CategoryDateTimeXAxis - Poor performance on Zoom
posted

Hi,

I'm using XamDataChart. My DataSource is a collection of object, that contains TimeStamp (in OADate format) and Value as members.

I wanted to draw a LineSeries on the chart with the above said collection and so used the CategoryDateTimeXAxis to bind the TimeStamp and NumericYAxis to bind the Value. This worked fine. But when there are more points(say 100000) and I Zoom the chart, it takes much time to display the zoomed area.

This responds really fast when the same is tried with CategoryXAxis. But unfortunately, I couldn't map any data field (like TimeStamp) to the CategoryXAxis, which inturn plots datapoints in equally calculated intervals (this is undesired..). Also, CategoryXAxis doen't support setting Minimum and Maximum Values to the Axis. Both of these requirements are critical to me.

Is there a way in which I could make use of the CategoryDateTimeXAxis efficiently, without big performance hits ?

Or by any chance, can we bind a DateTime/OADate field to CategoryXAxis and set the Minimum and Maximum value for the Axis ?

NOTE: I should only use LineSeries, so NumericXAxis is not an alternative too. Also, capturing the PlotArea width and Height was not possible for me. I tried doing it through PlotAreaBackgroundContent which returns 'null' always. I definitely feel that the XamDataChart lags in basic requirements like this, which are available with even the age old charting components in the market.

 

Parents
No Data
Reply
  • 30692
    Suggested Answer
    Offline posted

    Hi,

    If you install the latest service release you should have access to the minimum and maximum value properties on CategoryDateTimeXAxis. Setting the minimum and maximum values for CategoryXAxis is done via you prefiltering your data.

    If you are only using 100,000 points, I don't see why you would be seeing much delay when you zoom. Which version are you using?

    The difference in efficiency between the CategoryXAxis and the CategoryDateTimeXAxis mostly boils down to the fact that the CategoryDateTimeXAxis does not assume your data is already sorted, so much sort your data, and must virtualize the geometry in a different way. Its possible the shape of your data is creating some unforseen performance issue though, could you provide some sort of small sample that illustrates the problem?

    If you examine the actualsize of your series or axes, that will be equal to the plot area size. Could I ask why you want to know the plot area size? PlotAreaBackgroundContent is designed so that you can provide some content to be rendered in the background of the chart. If you put something here that was aligned to stretch then it also would be the size of the plot area.

    Hope some of that helps! Let me know if you have more questions.

    -Graham

Children
No Data