Re: Gantt serie with different colors



aleicaro@xxxxxxxxx wrote:
> Hi,
> I've the following problem.
> I have to build a Gantt chart. On X axis I've obviously the time. On Y
> axis I've some resources (employees). The chart will represent when
> each employee is busy. I would like to have a different colour
> (assigned from code) for each employee, and I would like to have, for
> each employee a different colour for the sundays (I know when is
> sunday but how can I assign a different color for a piece of "bar").
>
> Is it possible, and how can I do it?

Having created such a beast a few years ago, I have 2 hints for you:
1. Rectangles are painted separately. That is, no different colours in same
operation. Also, if tou want to draw a line around the entire (composite)
rectangle, this needs another painting operation.
2. Do create an "offscreen" bitmap to do your drawing - and then copy the
repaint region from this onto the visible control's canvas in one operation.
Reason: Offscreen drawing/painting is much faster, and by reducing visual
update to one single one you avoid delays and flickering. bear in mind that
by using an offscreen bitmap the graphic is never erased, only repainted.
Avoids flicker.

--
Regards,

Bjørge Sæther
bjorge@xxxxxxxxxxxx


.



Relevant Pages

  • Gantt serie with different colors
    ... I have to build a Gantt chart. ... On X axis I've obviously the time. ... axis I've some resources. ... each employee is busy. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Gantt chart labels missing
    ... Choose Format>Selected Axis ... > I wanted to make a gantt chart with time, so I download the gantt template ... > Microsoft article it was really helpful ... > Barbara Wiseman. ...
    (microsoft.public.excel.charting)
  • Re: Gantt chart labels missing
    ... > Choose Format>Selected Axis ... I hardly ever use excel charts. ... >> Microsoft article it was really helpful ... >> However I now have a lovely Gantt chart in hours, ...
    (microsoft.public.excel.charting)
  • Formatting Calendar View
    ... After making a gantt chart for an entire project, ... a new project for each employee and print out calendar view schedules ... Split tasks don't show as split in calendar view, ... a "split pattern" option under bar styles. ...
    (microsoft.public.project)
  • Re: Schedule
    ... Check the check box and you'll get a Gantt chart. ... Microsoft Excel MVP ... table showing we the employee works ...
    (microsoft.public.excel.worksheet.functions)