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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Real time line chart

Thread ID:





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

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 05:44 AM UTC

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 07:31 AM UTC

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 07:38 AM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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