TGRChart flashing on update

I'm using TQRChart to draw a real-time line graph of net bandwidth usage.  I'm updating it every second, but about 50% of the time, it flashes white quickly on the update.  It is really annoying.  Any ideas of how to fix this?
kdwAsked:
Who is Participating?
 
ZifNabConnect With a Mentor Commented:
Hi kdw,

 weren't the TChart components installed?

to answer :

TQRChart is just used to put a TeeChart on a print-form... And making a document for the printer isn't real-time... ???? So I think you're working with a wrong component. TQRChart is used with a TQuickRep.

So , put a TDBChart OR TChart on your form.

Regards, Zif.

0
 
BlackManCommented:
Take a look at the LockWindowUpdate systemcall, it freezes the window while you are updating it.
Call LockWindowUpdate(MyForm.Handle) to start the lock and LockWindowUpdate(0) to release the window again.

0
 
kdwAuthor Commented:
It doesn't really seem to help.  I lock it, remove one point from the front, add one to the end, then unlock it, and still get flashing about 50% of the time.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
kdwAuthor Commented:
it doesn't really seem to help.  I lock it, remove one point from the front, add one to the end, then unlock it, and
       still get flashing about 50% of the time.
0
 
ZifNabCommented:
Hi kdw,

heh? QRChart as graphing component on a form? It's a wrapper component for TeeChart component...

TQRChart is just used to put a TeeChart on a print-form... And making a document for the printer isn't real-time... ???? So I think you're working with a wrong component. TQRChart is used with a TQuickRep.

So , put a TDBChart OR TChart on your form!

Zif.
0
 
ZifNabCommented:
kwd,

 so it's normal that you get flashes when using TQRChart! I think it just uses a bitmap jpeg to draw on it's canvas. It uses a undelying teechart to first draw the things and then put it in total on the canvas...

Zif.
0
 
kdwAuthor Commented:
QRChart is the one you can actually draw onto a form with the IDE.  QRDBChart is automatically included also. Regardless, the chart works but flashes.
0
 
ZifNabCommented:
kdw,

 are you talking of Quickreport chart or does QR stands for something else?

 If you take the standard charting components of D3, then you have : TChart and TDBChart. For printing purposes you've a wrapper TQRChart.

Now if QR stands for Quickreport, then you are using the wrong components, instead you need to use TChart.

Now, for what stands QR in your case? From which company is this charting tool?

Zif.
0
 
kdwAuthor Commented:
Its the standard reports in the QReport TAB shipped with D3.
If QRChart is the wrong one, which on of the standard controls should I be using?

0
 
ZifNabCommented:
Hi kwd,

you're talking of the wrapper of TChart for QuickRep, so your working with the wrong component.

 You've to go to the 'additional' tab and select TChart. If you're working with DB then you've to go to 'data controls' and select TDBChart.

! Tchart is only standard from version 3 of delphi!

Regards, Zif.
0
 
kdwAuthor Commented:
Like I said, the QRChart (which will include QRDBChart), are the only ones available in the IDE to draw on.  I'm not sure what you are suggesting I do to fix this.

0
 
ZifNabCommented:
kwd, which version of Delphi are you using?
0
 
ZifNabCommented:
if you're using D3 or D4 and you don't find the components TChart, TDBChart, then install these ones. You should normally have them. (look for TeeChart) Zif.
0
 
kdwAuthor Commented:
You the MAN.  Thanks for sticking with me.  Submit the answer again and I'll grade it.  Thanks.

0
 
kdwAuthor Commented:
DBChart was the trick.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.