I have a minor issue that seems to require a lot of work to change. I noted that pie graphs start with the first pie piece created at 180 degrees and populates counter clockwise. When I use a half pie as a 'gauge' the left most pie piece corresponds to the bottom legend item, but is the first item for my graph. I need it to be reversed so it shows first. I tried using exchange, but it seems to need to be called after all items are drawn. Is there a way I can override the default drawing and populate the legend manually? Or is there a way to make the pie graphs start drawing from the left and populating clockwise?
Thanks,
Rick
Easy way to reverse Legend Items or reverse pie drawing
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Perfect
I didn't even know that was an option. Thanks so much.
One more question. I have the following code for printing the graph:
Graph1 := TChart1(G1);
Meta := Graph1.TeeCreateMetafile(True, Rect(0, 0, Graph1.Width, Graph1.Height));
try
Canvas.StretchDraw(CRect, Meta);
finally
end;
finally
Meta.Free;
end;
When I print with this function the Legend colored symbols print out excessively wide and I can't figure out how to resize them to normal as they appear on the screen. Everything else prints normal size. Any ideas?
Thanks again,
Rick
One more question. I have the following code for printing the graph:
Graph1 := TChart1(G1);
Meta := Graph1.TeeCreateMetafile(True, Rect(0, 0, Graph1.Width, Graph1.Height));
try
Canvas.StretchDraw(CRect, Meta);
finally
end;
finally
Meta.Free;
end;
When I print with this function the Legend colored symbols print out excessively wide and I can't figure out how to resize them to normal as they appear on the screen. Everything else prints normal size. Any ideas?
Thanks again,
Rick
Hi Rick,
are you modifying any legend symbol settings ? Using the following code it prints out fine here :
are you modifying any legend symbol settings ? Using the following code it prints out fine here :
Code: Select all
procedure TForm1.BitBtn1Click(Sender: TObject);
var meta : TMetafile;
begin
Chart1.BevelOuter := bvNone;
Meta := Chart1.TeeCreateMetafile(True, Chart1.ClientRect);
try
Printer.Orientation := poPortrait;
Printer.BeginDoc;
try
Printer.Canvas.StretchDraw(Rect(1,1,Printer.PageWidth - 1,
Printer.PageHeight - 1),Meta);
finally
Printer.EndDoc;
end;
finally
Meta.Free;
Chart1.BevelOuter := bvRaised;
end;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com