GetTeeBrush and TGanttSeries
Posted: Thu Nov 15, 2012 10:55 am
Hi,
Two questions:
1) I would like to put a brush on a TGanttSeries - the code below doesn't allow me to do that? How do I assing the Brush to the TGanttseries??
2) Is it possible to assing different types of Brush to different Points in the same GanttSeries? How do I do that?
Two questions:
1) I would like to put a brush on a TGanttSeries - the code below doesn't allow me to do that? How do I assing the Brush to the TGanttseries??
2) Is it possible to assing different types of Brush to different Points in the same GanttSeries? How do I do that?
Code: Select all
procedure TForm10.FormCreate(Sender: TObject);
var
ABitmap : TBitmap;
s : shortstring;
begin
ABitmap := TBitmap.Create;
GetTeeBrush(3,ABitmap);
with Chart1.AddSeries(TGanttSeries.Create(self)) as TGanttSeries do
begin
ParentChart := Chart1;
ColorEachPoint := true;
pointer.Brush.Image.Assign(ABitmap);
Title := 'PO Planned';
ShowInLegend := true;
XValues.Order:=loNone;
Marks.visible := true;
Marks.Transparent := true;
Xvalues.DateTime := true;
with Chart1[Chart1.SeriesCount-1] as TGanttSeries do
begin
Pointer.VertSize:=10;
s := 'hej';
AddGantt(now,now+1,-1,s);
end;
end;
end;