Hi,
How do I access the individual TGantt point so that I can change the brush, linepen etc??
In the attached photo I would like to give the individual point a different brush color instead of red and different line pen colors instead of just black
TGantt issue
TGantt issue
- Attachments
-
- TGantt.JPG (91.7 KiB) Viewed 3618 times
Re: TGantt issue
Hello,
For the brush, you can set a color when you add the point with the AddGanttColor method that requires a Color as an argument.
Alternatively, you can change a point color after populating the series, ie:
To change a point border line is a bit tricky because it is a unique property for the whole series, not for each point.
You could use the OnGetPointerStyle event to change the series' line pen for each point. Ie:
For the brush, you can set a color when you add the point with the AddGanttColor method that requires a Color as an argument.
Alternatively, you can change a point color after populating the series, ie:
Code: Select all
Series1.ValueColor[3]:=clWhite;
You could use the OnGetPointerStyle event to change the series' line pen for each point. Ie:
Code: Select all
function TForm1.Series1GetPointerStyle(Sender: TChartSeries;
ValueIndex: Integer): TSeriesPointerStyle;
begin
with (Sender as TGanttSeries).Pointer do
if (ValueIndex = 2) then
Pen.Color:=clRed
else
Pen.Color:=clBlack;
Result:=psRectangle;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |