5.2.2 Changing Standard Shapes and Colors


Code

class Example(gantt.Standard):
    data = acso
    parent_shape = "wedge_bar_wedge"
    leaf_shape = "circle_bar_house"
    milestone_shape = "house"
    properties = \
    {"parent.start.facecolor" : "hotpink", #the left wedge of all parent shapes
      "parent.end.facecolor" : "darkviolet",#the right wedge
      "parent.bar.facecolor" : "lightblue", #the bar in the middle 
      "parent.start.up" : False,            #turns the left wedge down
      "end.facecolor" : "fuchsia",          #all right symbols of combinations
      "start.facecolor" : "indianred", 
      "bar.facecolor" : "white",
      "bar.height"    : 6,                  #the height of the middle bar in VSEP units
      "complete.edgecolor" : "black",       #the complete bar
      "complete.facecolor" : "green",
      "house.facecolor" : "gold" }

Result

\includegraphics[width=\textwidth]{gencustomize/gantt2}

Description

The attributes parent_shape, leaf_shape, and milestone_shape control the general apperance of the gantt widgets. There are several shapes that can be used: Either symbol shapes like "diamond", "wedge", "house", or "circle", or long shapes like "bar" or "brace" or a combination of bars and symbol shapes, that have the form "<shape>_bar_<shape>" like "circle_bar_diamond". The property attribute specify the display style of shapes. By default there are three property groups defined: parent (for tasks that have children), milestone (for milestone tasks), leaf (for all other tasks).