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.

Real time line chart

Thread ID:





80672 Apr 21,2009 03:14 PM Apr 23,2009 03:38 AM WPF 3
Tags: Chart
Steve Loft
Asked On April 21, 2009 03:14 PM

I'm adding values to a line chart with a DateTime X-Axis in real time, at random intervals, and it works OK expect that the points are plotted at fixed intervals even though the actual time intervals vary.

Is there any way I can correct this?

Pavithra J [Syncfusion]
Replied On April 22, 2009 01:44 AM

Hi Steve,

Thanks for your interest in Syncfusion products.

Since your expectation is to have equal DateTime interval on X-Axis, you can make use of the ChartAxis property "DateTimeInterval".

The below given code snippet will help you to maintain a constant interval of 1 mins.



this.Chart1.Areas[0].PrimaryAxis.DateTimeInterval = new TimeSpan(0, 1, 0);

Please let us know if you have further queries.


Steve Loft
Replied On April 22, 2009 03:31 AM

Thank you for the reply, but it doesn't seem to help. Perhaps I didn't explain it very well.

I've attached an image of a chart. The first two points are 5 seconds apart; the next are 3 seconds apart, the next 9 seconds, and so on. But on the chart, they are all the same distance apart. I need them to appear at the correct distance apart according to the time they were plotted.



Pavithra J [Syncfusion]
Replied On April 23, 2009 03:38 AM

Hi Steve,

Thanks for your interest in Syncfusion products.

For better look and feel we used to maintain equal distance between the datapoints. However it is possible plot datapoints based on positional values. For this IsIndexed property is helpful.

When IsIndexed property is set to false, all the values in the collection will be sorted in ascending order and they are plotted. Such an X axis that ignores the X-values and simply uses the positional value of a point in a series.

When IsIndexed is set to true, Y values will be plotted based on the order in which they are added to the collection and X values are displayed as labels in the X axis.

Please refer to the sample from the below given link, which clearly shows the behavior of Indexed mode.

IsIndexed Sample

But, you cannot visualizes the distance with continuous charts like line, as this will be drawn by joining all the points.

Please let us know if you have any queries.



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.

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.