Hi.
Is there anyway to draw a second color in a gantt bar???
For example, I want to draw an thin colored line a the bottom of a gantt bar to express the priority of the task.
Thanks in advance.
(D7 & TeeChart Pro 7)
different colors in one gantt bar
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi cbr,
You can use gradients in gantt bars. You'll find the gradient editor when using Chart Editor at Series\Gantt\Gradient.
You can use gradients in gantt bars. You'll find the gradient editor when using Chart Editor at Series\Gantt\Gradient.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi cbr,
Yes, it is possible using the series OnGetPointerStyle event and using code similar to:
Yes, it is possible using the series OnGetPointerStyle event and using code similar to:
Code: Select all
function TForm1.Series1GetPointerStyle(Sender: TChartSeries;
ValueIndex: Integer): TSeriesPointerStyle;
begin
With Series1.Pointer.Gradient do
if (Series1.YValue[ValueIndex]<5) then
begin
StartColor:=clBlue;
MidColor:=clRed;
end
else
begin
StartColor:=clYellow;
MidColor:=clGreen;
end;
result:=psRectangle;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
With Series1 do
begin
FillSampleValues();
ColorEachPoint:=False;
Color:=clNone;
Pointer.Gradient.Visible:=True;
end;
end;
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi cbr,
That doesn't happen here using latest TeeChart sources in a new Delphi 7 project, dropping a TChart in a form, adding a TGanttSeries to it and using the code I posted.
Could you please post an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
That doesn't happen here using latest TeeChart sources in a new Delphi 7 project, dropping a TChart in a form, adding a TGanttSeries to it and using the code I posted.
Could you please post an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
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 |
Hi,
Chart1.BottomAxis.SetMinMax(today - 3, today + 5);
by:
Chart1.BottomAxis.SetMinMax(today - 5, today + 7);
you will be able to see the complete gantt bar.
As I can see this is not related with Gradients, you can set Gradient visible to False and you will still seeing one bar outside the Axis limits. This is because you've set a SetMinMax values which are bigger and smaller of the gant start and end values respectively, changing :gradients, the gantt bars are drawn outside the axis. That means the gantt bars are not restricted by the axis.
Any Idea?
Chart1.BottomAxis.SetMinMax(today - 3, today + 5);
by:
Chart1.BottomAxis.SetMinMax(today - 5, today + 7);
you will be able to see the complete gantt bar.
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi,
sorry, but in my opinion this is related with gradients.
I set gradient visible to false and the bars are restricted by the axis limits.
And I don't want to set the Axis MinMax Values depending on the start and end values because I want to use scrollbars to change the view.
There must be another way, any ideas ???
Thanks in advance.
sorry, but in my opinion this is related with gradients.
I set gradient visible to false and the bars are restricted by the axis limits.
And I don't want to set the Axis MinMax Values depending on the start and end values because I want to use scrollbars to change the view.
There must be another way, any ideas ???
Thanks in advance.
Hi,
I'm sorry, you're correct, I just test it with a non CLX app. and worked fine. I've been able to reproduce it with a CLX app. It seems to be a bug, it has been added on our defect list and a fix for it will be considered to inclusion for the next maintenance releases.
For the moment I've not found a workaround.
I'm sorry, you're correct, I just test it with a non CLX app. and worked fine. I've been able to reproduce it with a CLX app. It seems to be a bug, it has been added on our defect list and a fix for it will be considered to inclusion for the next maintenance releases.
For the moment I've not found a workaround.
Pep Jorge
http://support.steema.com
http://support.steema.com