Jump to content
Software FX Community

Real-time chart & LoopPos


User (Legacy)

Recommended Posts

Hi,

I'm doing a real-time chart, and so far everything works great. I use a

lines series, without markers. My problem, however, is that when the

chart wraps around, point n (the last one I insert) is linked to point

n+1 (which is now the oldest point in the chart). I've attached a

screenshot with this message. Is there anyway I can prevent that?

Thanks,

Maan

Attachments.zip

Link to comment
Share on other sites

This behavior is by design. The last point is always connected with the 

first point. In fact, the Line chart doesn't know that these points is the

first and last, the data layer hides this and provides to the line chart the

data in the order in which it appears in the screen.

You can however, control the color of this segment independently, which will

allow you to make it transparent. Here is how:

chart1.Points.Clear();

chart1.Points[pointIndex].Color = Color.Blue;

Where pointIndex starts at 0 and keeps increasing with every point you add

and goes back to zero when it reaches the bufferSize. In each iteration you

would do something like:

pointIndex = (pointIndex + 1) % bufferSize

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...