Jump to content
Software FX Community

Using Constant Lines


User (Legacy)

Recommended Posts

I'm using ChartFX to display previously recorded data. The duration of

recording depends on the user, so the number of points that will be

displayed may vary from 300 to 30000.

I'm using a constant line as a vertical "cursor" that may be dragged using

the mouse (and the MouseDown, MouseMove and MouseUp events) in order to

display the current value for each series.

The whole thing works fine with 300 points, but when I'm moving the "cursor"

with 30000 points, the constant line takes a lot of time to refresh its

position (around 0.5 second) and the movement of the constant line is jerky.

Is there a way to speed up the display? I don't need to refresh the whole

graphic area, but just the constant line.

Can you help me please ?

Thanks

Bruno

Link to comment
Share on other sites

It is normal that repainting a 30,000 point chart on a MouseMove will look 

"jerky". 0.5 secs for 30,000 point is not bad.

The first optimization that comes to mind would be to NOT set the constant

line UNLESS the actual value has change. Vertical movements of the mouse

should not cause a re-paint.

Because constant lines are not designed for this purpose, anything you do to

the constant line (like changing its value) will invalidate the whole chart.

Do you know about the CrossHairs property ? this property is designed to

work fast, maybe you can combine this with the constant line approach but

move the constant line only at MouseUp.

I can also think of an implementation that has a timer and minimizes the

re-paint, so it lets you move the mouse fast but it re-paints when the mouse

stays quiet for a little while (.5 secs or so).

--

FP

Software FX

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...