I've been trying use a conditional inside my Gantt chart in order to become the process of change color automatically. In this case, I just wanna color red the bars that have progress minor them 100%.
\documentclass{article}
\usepackage{etoolbox}
\usepackage{parskip}
\usepackage{tikz}
\usepackage{pgfgantt}
\usepackage{ifthen}
\newcounter{myWeekNum}
\stepcounter{myWeekNum}
\newcommand{\myWeek}{\themyWeekNum
\stepcounter{myWeekNum}
\ifnum\themyWeekNum=53
\setcounter{myWeekNum}{1}
\else\fi
}
\newcommand{\setvalue}[2]{
\ifdefined #1
\renewcommand{#1}{#2}
\else
\newcommand{#1}{#2}
\fi
}
\setvalue{\x}{100}
\setvalue{\GreenColor}{green}
\begin{document}
\setcounter{myWeekNum}{1}
\ganttset{%
calendar week text={\myWeek{}}%
}
%
\begin{ganttchart}[
vgrid={*{6}{draw=none}, dotted},
link mid=.25,
link bulge=4.3,
progress=today,
today={\the\year-\the\month-\the\day},
today rule/.style={draw=blue, ultra thick},
today label=\today,
bar/.append style={fill=green}, %I wanna replace this line for the next line
%bar/.append style={[fill="\ifthenelse{\x<100}{green}{red}"]}, %Problem
%bar/.append style={fill=\GreenColor}, %Test line
bar incomplete/.append style={fill=white},
x unit=.055cm,
y unit title=.7cm,
y unit chart=.6cm,
time slot format=isodate,
time slot format/start date=2017-12-01, title label font=\scriptsize
]{2018-01-13}{2018-05-30}
\ganttset{bar height=.6}
\gantttitlecalendar{year, month=shortname, week} \\
\ganttgroup{Group}{2018-01-13}{2018-05-17} \\
\ganttbar[progress=100]{Task1}{2018-01-13}{2018-05-17}\\
\ganttbar[progress=60]{Task2}{2018-02-13}{2018-05-17}\\
\ganttbar[progress=20]{Task3}{2018-03-13}{2018-05-17} \\
\ganttbar[progress=90]{Task4}{2018-04-13}{2018-05-17} \\
\ganttlink[link mid=.6]{elem0}{elem1}
\ganttlink[link mid=.6]{elem1}{elem2}
\ganttlink[link mid=.6]{elem2}{elem3}
\end{ganttchart}
\end{document}
Can someone help me?
