Oli2
asked on
drawing a chart
Hi,
this question will be hard to explain, but I'll give it a shot
I want to draw a chart,
using SetPixel, to show the performance of some program.
I set the "top" of the pixel regarding to the performance and increase the "left" of the (next) pixel by one every second.
Get it?
okay. Here's my problem: I don't want to use 1024 pixels in width, so I should somehow "scroll" the chart.
Anyone got a clue, idea, etc.?
Regards, Oli
this question will be hard to explain, but I'll give it a shot
I want to draw a chart,
using SetPixel, to show the performance of some program.
I set the "top" of the pixel regarding to the performance and increase the "left" of the (next) pixel by one every second.
Get it?
okay. Here's my problem: I don't want to use 1024 pixels in width, so I should somehow "scroll" the chart.
Anyone got a clue, idea, etc.?
Regards, Oli
Draw in a ScrollBox...
Is what you are after a moving graph that looks like the performance monitor graph in NT Task monitor?
If so, post your e-mail address, I have a component that does that...
If so, post your e-mail address, I have a component that does that...
ASKER
Peter -> sorry, I don't want to use a TChart Component.
Epsylon -> drawing on a TScrollBox was my first idea also, but if you set Pixels on a ScrollBox and minimize the window... they're gone!
mullet -> yep, something like that NT performance monitor is in my mind. email is oscheit@quoka.com.
Maybe the source of that component will help me... In that case you'll get the points
regards, Oli
Epsylon -> drawing on a TScrollBox was my first idea also, but if you set Pixels on a ScrollBox and minimize the window... they're gone!
mullet -> yep, something like that NT performance monitor is in my mind. email is oscheit@quoka.com.
Maybe the source of that component will help me... In that case you'll get the points
regards, Oli
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can also manipulate the bitmap directly:
procedure TForm1.Button2Click(Sender : TObject);
const DELTA = 25;
begin
with Image1.Picture.Bitmap do
begin
Canvas.CopyRect(Bounds(0,0 , 500 - DELTA, 500), Canvas, Bounds(DELTA, 0, 500 - DELTA, 500));
Canvas.FillRect(Bounds(500 - DELTA, 0, DELTA, 500));
end;
end;
procedure TForm1.Button2Click(Sender
const DELTA = 25;
begin
with Image1.Picture.Bitmap do
begin
Canvas.CopyRect(Bounds(0,0
Canvas.FillRect(Bounds(500
end;
end;
ASKER
Hi, Epsylon!
This sounds good to me.
I'll check it out.
Regards, Oli
This sounds good to me.
I'll check it out.
Regards, Oli
Hello,
what about using a component like this one :
http://www.fi.muni.cz/~xkovalc/zip/loggraph.zip
It's doing the job for you...
what about using a component like this one :
http://www.fi.muni.cz/~xkovalc/zip/loggraph.zip
It's doing the job for you...
ASKER
Hi, Epsylon.
I tried it out and it works fine for me.
Thanx.
Thanx also to all others trying to help.
Regards, Oli
I tried it out and it works fine for me.
Thanx.
Thanx also to all others trying to help.
Regards, Oli
Chart1.BottomAxis.Scroll(1
...
Chart1.BottomAxis.Scroll(-
...
Chart1.LeftAxis.Automatic:
Chart1.BottomAxis.Automati
Peter