Page 1 of 1

Vertical Line for cursor

Posted: Thu Mar 11, 2010 6:52 pm
by 10548769
Hi, i would like to know what would be the best optimized solution to implement a vertical bar as a cursor. I'm trying to do a data logger analyser and having an vertical bar that is draw at the x,y of my mouse. With the OnAfterDraw event, thing go well until i get a lot of data. We do logs value every 1min and sometime people want to to check a full month or more, So doing a onMouseMove with Chart.Invalidate in is very very too much hard on my CPU and my vertical bar start to lag a lot.

What came first in my mind was to do some "double buffer":
1. Get a copy of the paint result in OnAfterDraw.
2. OnMouseMove -> Draw the copy over TChart and then, draw my vertical bar.

I havent tried it, but i was wondering, since there is a lots of tools already developped, if there was a better way to do that.

Thanks again.

Re: Vertical Line for cursor

Posted: Fri Mar 12, 2010 8:50 am
by narcis
Hi GotoXY,

Why don't you try using a cursor tool set to vertical and optionally set FastCursor = true. You could also set cursor's pen settings. Another alternative would be using a ColorBand tool.

Hope this helps!

Re: Vertical Line for cursor

Posted: Tue Mar 16, 2010 7:26 pm
by 10548769
Hi Narcis, i did try the Option 1 : Using CursorTool
Problem #1, The line is not redraw often, so if i move my mouse fast, the bar will completely disapear.
Problem #2, I presume FastCursor should solve the Problem #1, but it seems that i can't find the property either in TeeChart or TCursorTool.

Im using D2010 and TeeChart 8.06Pro

Thanks again

Re: Vertical Line for cursor

Posted: Thu Mar 18, 2010 3:43 pm
by yeray
Hi GoToXY,

Excuse us, the FastCursor property is only available in TeeChart for NET. In VCL it should be the same by default.

Re: Vertical Line for cursor

Posted: Thu Mar 18, 2010 3:47 pm
by 10548769
Seems ill be force to use my technic "double buffer" over your cursor because it dont refresh fast enough and dont look really professionnal that way. Maybe later, you will have a better Graphic handling for the cursor so it will refresh faster.

You can see what i'm talking about in this example.

Re: Vertical Line for cursor

Posted: Fri Mar 19, 2010 12:05 pm
by yeray
Hi GoToXY,

I'm afraid I can't see any problem with the cursor tool in your application. This made me think that it could be due to a difference between your and my machine but the task manager here says that this testing application is consuming only 6MB RAM and 0~1% CPU (even moving the cursor as fast as I can).

In the other hand, ok, your lines look more professional (three vertical lines and a circle following the mouse vs a simple vertical line), but it flickers a little bit when moving while I can't see the same with our cursor tool.

Re: Vertical Line for cursor

Posted: Fri Mar 19, 2010 5:06 pm
by 10548769
That is very intersting! Because on my machine (Quad Core 2.6) my cursor doesnt flick but yours do and on your machine its the opposite. Ill do some other test over slower machine and let you know how its doing because handling the cursor the way i do... i dont really like it.

And about the professional side, it wasnt about the design but the flickering i was getting from the CursorTool in TeeChart. Only a vertical line would be just fine if it wasnt flickering.

Thanks again Yeray

Re: Vertical Line for cursor

Posted: Fri Mar 19, 2010 5:11 pm
by 10548769
I did other test and it seems to be happening only in Windows 7. Can you guys check out why ? So i could use your cursor tool.

Thanks a lot

Re: Vertical Line for cursor

Posted: Wed Mar 24, 2010 12:55 pm
by 10548769
bump

Re: Vertical Line for cursor

Posted: Wed Mar 24, 2010 2:19 pm
by yeray
Hi GoToXY,

Please, be patient, we haven't forgotten you. If you are looking for priority support you you may be interested in knowing of our Pro-Support service:
http://www.steema.com/licensing/support

Re: Vertical Line for cursor

Posted: Wed Mar 24, 2010 2:41 pm
by 10548769
I im very sorry, i was used to the 1 day reply from ur support. I wont do any other bump next time and be patient ;)

Thanks again

Re: Vertical Line for cursor

Posted: Fri Mar 26, 2010 10:01 am
by yeray
Hi GoToXY,

We've investigated this but couldn't find the difference between both systems that could affect this behaviour.
What we've seen is that with the latest drivers available (in our case NVIDIA v197.13) the difference between using Cursor Tool and your lines isn't very significant. The Cursor Tool still seems to work better in XP while your tool seems a little bit better for Win7. But note that the difference is almost inappreciable, even multiplying x10 the number of points.

Re: Vertical Line for cursor

Posted: Thu Apr 01, 2010 7:25 pm
by 10548769
I have tested it over many video card (ATI,nVidia, onboard Intel) in Win7, i always got flickering with the CursorTool and even when Zooming (the rectangle of the zoom area is flickering a lot too). Can you add this to the wish list please.

Thanks a lot.

BTW: did you guys planned a new version with D2D ? So we could have cool animation in TeeChart ?.

Re: Vertical Line for cursor

Posted: Tue Apr 06, 2010 11:47 am
by yeray
Hi GoToXY,
GoToXY wrote:I have tested it over many video card (ATI,nVidia, onboard Intel) in Win7, i always got flickering with the CursorTool and even when Zooming (the rectangle of the zoom area is flickering a lot too). Can you add this to the wish list please.
Of course, done (TV52014780).
GoToXY wrote:BTW: did you guys planned a new version with D2D ? So we could have cool animation in TeeChart ?.
We've made some tests with D2D but it's too soon to announce even if it is going to be feasible or not.