| @@ -1,13 +1,15 @@ | |||||
| \documentclass{standalone} | \documentclass{standalone} | ||||
| \usepackage{tikz,pgfplots} | \usepackage{tikz,pgfplots} | ||||
| \usepackage{siltex} | \usepackage{siltex} | ||||
| \usetikzlibrary{arrows.meta,positioning} | |||||
| \usetikzlibrary{arrows.meta,positioning,calc,fadings} | |||||
| \pgfplotsset{compat=1.17} | \pgfplotsset{compat=1.17} | ||||
| \begin{document} | \begin{document} | ||||
| \begin{tikzpicture} | \begin{tikzpicture} | ||||
| \pgfmathsetlengthmacro{\xbarvalue}{-3mm} | |||||
| \pgfmathsetlengthmacro{\barwidthvalue}{4mm} | |||||
| \begin{axis}[ | \begin{axis}[ | ||||
| xbar=-3mm, | |||||
| bar width=4mm, | |||||
| xbar=\xbarvalue, | |||||
| bar width=\barwidthvalue, | |||||
| xmin=0, | xmin=0, | ||||
| xmax=21, | xmax=21, | ||||
| width=85mm, | width=85mm, | ||||
| @@ -21,7 +23,18 @@ | |||||
| ] | ] | ||||
| \addplot[draw=red,fill=red!40] coordinates {(2,Problem Description) (3,Specifications) (3.5,Initial Design) (13,Feature Definition) (0.5,Test Protocol) (3,Development Cycle 1) (17,Development Cycle 2) (20,Software Development)}; | \addplot[draw=red,fill=red!40] coordinates {(2,Problem Description) (3,Specifications) (3.5,Initial Design) (13,Feature Definition) (0.5,Test Protocol) (3,Development Cycle 1) (17,Development Cycle 2) (20,Software Development)}; | ||||
| \addplot[draw=blue,fill=blue!40] coordinates {(2,Problem Description) (3,Specifications) (5,Initial Design) (6,Feature Definition) (1,Test Protocol) (3,Development Cycle 1) (13,Development Cycle 2)}; | \addplot[draw=blue,fill=blue!40] coordinates {(2,Problem Description) (3,Specifications) (5,Initial Design) (6,Feature Definition) (1,Test Protocol) (3,Development Cycle 1) (13,Development Cycle 2)}; | ||||
| \legend{Time Spend,Time Planned}; | |||||
| \legend{Time Spend,Time Planned}; | |||||
| \pgfmathsetlengthmacro{\baroffset}{\barwidthvalue+\xbarvalue/2} | |||||
| \pgfmathsetlengthmacro{\smeer}{7mm} | |||||
| \node (a) at ($(axis cs:3,Development Cycle 1)-(0.1mm,0mm)+(0mm,\baroffset)$) {}; | |||||
| \node (b) at ($(axis cs:3,Development Cycle 1)-(0.1mm,0mm)-(0mm,\baroffset)$) {}; | |||||
| \fill[white] (a) rectangle ++(\smeer,-\barwidthvalue-1mm); | |||||
| \fill[red!40,path fading=east] (b) rectangle ++(\smeer,1mm); | |||||
| \fill[blue!40,path fading=east] (a) rectangle ++(\smeer,-\barwidthvalue); | |||||
| \draw[white] ($(a)$) -- +(\smeer,0mm) ++(0mm,-\barwidthvalue) -- +(\smeer,0mm); | |||||
| \draw[white] ($(b)$) -- +(\smeer,0mm); | |||||
| \draw[blue,path fading=east] ($(a)$) -- +(\smeer,0mm) ++(0mm,-\barwidthvalue) -- +(\smeer,0mm); | |||||
| \draw[red,path fading=east] ($(b)$) -- +(\smeer,0mm); | |||||
| \end{axis} | \end{axis} | ||||
| \end{tikzpicture} | \end{tikzpicture} | ||||
| \end{document} | \end{document} | ||||