Hello,
for some long running conversion we want to add a progress display with a graphical representation like Win 10 shows when copying a large amount of files:
What kind of series to use for this, or is there maybe some example code for that ?
Thanks and best regards
Win10 (File copy) progress like chart graphics
Re: Win10 (File copy) progress like chart graphics
Hello,
Have you tried with just an Area series? You can find examples in the Features Demo included with the binary installation.
Have you tried with just an Area series? You can find examples in the Features Demo included with the binary installation.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Win10 (File copy) progress like chart graphics
Hello Yeray,
Thank you, using an Area series got me already a long way:
I have only one question left, I am using a TCursorTool to show the horizontal line with the current progress value.
Is there a way to show a custom text/string instead of the number, and then above the (TCursorLine) line on the right side in the frame ?
Just like in the Win10 dialog the string "Speed: 222KB/2". How to best solve that ?
Thanks and best regards,
Thomas
Thank you, using an Area series got me already a long way:
I have only one question left, I am using a TCursorTool to show the horizontal line with the current progress value.
Is there a way to show a custom text/string instead of the number, and then above the (TCursorLine) line on the right side in the frame ?
Just like in the Win10 dialog the string "Speed: 222KB/2". How to best solve that ?
Thanks and best regards,
Thomas
Re: Win10 (File copy) progress like chart graphics
Hello Thomas,
Instead of modifying the TAnnotationTool embedded into the TCursorTool, I'd use a separated TAnnotationTool and I'd modify its position at the TCursorTool's OnChange event.
Here a simple example showing how to do this:
Instead of modifying the TAnnotationTool embedded into the TCursorTool, I'd use a separated TAnnotationTool and I'd modify its position at the TCursorTool's OnChange event.
Here a simple example showing how to do this:
Code: Select all
uses Series;
var annot1: TAnnotationTool;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=False;
Chart1.Legend.Visible:=False;
Chart1.Hover.Visible:=False;
with Chart1.AddSeries(TAreaSeries) as TAreaSeries do
begin
AreaLinesPen.Visible:=False;
FillSampleValues;
end;
with Chart1.Tools.Add(TCursorTool) as TCursorTool do
begin
Style:=cssHorizontal;
FollowMouse:=True;
OnChange:=CursorOnChange;
end;
annot1:=Chart1.Tools.Add(TAnnotationTool) as TAnnotationTool;
annot1.Shape.Transparent:=True;
end;
procedure TForm1.CursorOnChange(Sender:TCursorTool; x,y:Integer; Const XValue,YValue:Double;
Series:TChartSeries; ValueIndex:Integer);
begin
annot1.Text:=FormatFloat('#,##0.##', YValue);
annot1.Left:=Chart1.ChartRect.Right-annot1.Width-5;
annot1.Top:=y-20;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Win10 (File copy) progress like chart graphics
Hello Yeray,
Thank You, that was exactly what I was looking for, this gives a very nice and generic progress display.
best regards,
Thomas
Thank You, that was exactly what I was looking for, this gives a very nice and generic progress display.
best regards,
Thomas