We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Performance of Range and Interval properties on ChartAxis

Thread ID:

Created:

Updated:

Platform:

Replies:

95510 Jul 14,2010 12:41 PM UTC Oct 12,2010 01:21 PM UTC WPF 4
loading
Tags: Chart
Morten Schou
Asked On July 14, 2010 12:41 PM UTC

I am having problems with the performance of the Range and Interval properties.

Going from a range of 10 seconds to a range of 6 hours on an X-axis take approx 3 seconds.

Going from a range of 1 second to a range of 6 hours on an X-axis take approx 60 seconds!!!!!. Even with no data displayed in the chart.

Please refer to the attached example.

I would very much appreciate a workaround for this.




ChartAxisRange_7e6cb8bd.zip

Morten Schou
Replied On July 14, 2010 01:59 PM UTC

Well, using a profiler it is evident that going from a very short time span with a similar small tick interval to a very long time span results in a lot ot labels to be calculated.

By detecting which 'way' the time span is changed, the tick interval size can be set either before or after the axis' range to avoid too many labels to be calculated.

Poorani Idhaya Bala M.A [Syncfusion]
Replied On July 16, 2010 05:46 AM UTC

Hi Morten ,

Thanks for choosing Syncfusion Products.

I have modified your sample to get better performance. Use the chart area's BeginInIt and EndInIt methods at the time of updating the range.

In this sample,

you are updating the range before updating the interval. Please set the interval value before updating the range. It will give you the better performance.

Please test this sample and let me know if you have any questions.

Thanks,
Poorani



ChartAxisRange_d587870f.zip

Morten Schou
Replied On October 8, 2010 12:04 PM UTC

Hi Poorani,

Well, it did'nt make much difference.

If always setting the Interval before the Range, you will eventually get into a situation where the Interval is so small that a huge amount of tickmarks need be calsulated.

In the attached example, going from 6 hours range to 1 sec range (first click the 6 hours interval and the the 1 sec interval button) results in approx 108000 tickmarks to be calculated (see the debug output). The entire process takes about 30 seconds which is not acceptable.

It does not seem that teh BeginInit and EndInit has any effect.

It can be handled - as I mentioned earlier - by detecting which way the range is going to be changed and from this decide in which order Interval and Range should be set. More convenient would be to have a BeginUpdate and EndUpdate on the ChartAxis as can be found on the ChartSeries.

Regards,

Morten



ChartAxisRange_9b4dccba.zip

Abdul Rahman A.H [Syncfusion]
Replied On October 12, 2010 01:21 PM UTC

Hi Morten,

Thanks for the update.

We have analyzed your sample. The time delay for rendering axis is because of initializing Interval before Range is initialized.

I have modified the sample and found all three cases works fine. Please find the modified sample attached here.

Regards,
Abdul Rahman







ChartAxisRange_fb0d3580.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;