Jump to content
Software FX Community

Re: Large real time charts using dll


User (Legacy)

Recommended Posts

Good morning Erik, 

I had the same problem- it IS related to the even spacing command. For what

I remember Frank telling me was that the size of the chart is related to the

number of points on it. If you change the size of the chart up or down, the

actual plotting area changes also so that each point has the same spacing

amount. Thus, when a certain threshold is hit, the spacing is reduced to a

lower size and causes the blank you see.

Getting ride of the CTE_EVENSPACING flag fixes this, but that's not what you

want. A separate solution is to make the whole chart fx bigger, which

"pushes" you into the next level and makes the chart area reappear.

I had the same problem with my real time chart which was a dynamically

allocated window- whenever the user made the window just slightly too small,

the chart area would disappear... I finally got rid of the even spacing and

the put code in to not refresh the display every time (this was to help

performance). Also I used CTE_SMOOTH and CTE_NOLEGINVALIDATE. The smooth

flag should take care of the flickering problem.

(If you want, there is another thread called "Sample using VC++ and CFX98

COMM Dll" that has a small application- this is a sample based on the

dynamically allocated real time chart i am talking about. Although in the

sample, I put the EVENSPACING flag back in.)

--

josh

Erik Alsmyr <erik.alsmyr@home.se> wrote in message

news:DE0379D14694D211B4CE00609770710D04FE30@sftfx-221.wamnet.net...

> When I try to change the number of values in a realtime chart the chart

area

> automatically changes its size on the screen. I change this by setting the

> MaxValues property to a new value. Because of this, when the chart area

> becomes too big, something happens and it shrinks into a single vertical

> line.

>

> I figure this has something to do with the CT_EVENSPACING flag.

>

> If I place the chart on the dialog in the resource editor I can set the

> number of values high but since I am creating the chart in runtime I have

to

> change this property after creating the chart object and thereby reducing

> the chart to a single vertical line as mentioned before.

>

> My question is if there is some way for me to lock the size of the

charting

> area so it does not change when I change the number of values?

>

> If not what method do you suggest for creating a real time chart with

about

> 5000 elements in runtime? If i exclude the CT_EVENSPACING flag the chart

> flickers and takes up 100% of CPU when the number of values exceed 600.

>

> I am using VC++ 6.0.

>

> Regards

> Erik Alsmyr erik.alsmyr@home.se

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...