skafdasschaf / latex-pgfgantt Goto Github PK
View Code? Open in Web Editor NEWHome of the pgfgantt package
License: LaTeX Project Public License v1.3c
Home of the pgfgantt package
License: LaTeX Project Public License v1.3c
If I use \ganttvrule to draw grid lines for years (because my resolution is 10 units per month and I want to have monthly grid lines), the lines overlap the actual bars.
Is it somehow possible to move the \ganttvrule lines on the grid layer?
Hey, I was trying to add a new chart element for meetings. Meetings can be completed or not but. I want to model this by filling them with another color when they are completed. This works mostly.
The problem I am facing is that I cannot remove the progress label altogether for all chart elements. Currently, I work around this by using this:
\ganttmeeting[progress label text={}]{Kickoff}{22.01.21}
I want to disable the progress label text for all meetings though.
Here is my definition of a meeting:
\newganttchartelement*{meeting}{
meetinguni/.style={
shape=circle,
draw=black,
fill=blue,
thick,
},
meeting left shift=.25,
meeting right shift=-.25,
meeting inline label node/.append style={
anchor=south west,
font=\scriptsize
},
}
I tried to set the font to 0pt, and I tried to add a key like this:
meeting progress label text={}
According to the manual, the package vertically aligns bar and group labels by prepending a \strut to the text. However, it doesn't do this with calendar labels. This is easily seen when producing a calendar of old-style numbers, which fail to align at the baseline:
\documentclass{article}
\usepackage{pgfgantt}
\usepackage[osf]{mathpazo}
\begin{document}
\begin{ganttchart}{1}{10}
\gantttitlecalendar{day}
\end{ganttchart}
\end{document}
A somewhat kludgy workaround is to pass the option "title label font=\strut" to the ganttchart environment. However, it occurs to me that perhaps adding a \strut to the calendar labels is something the package should be doing by default anyway, the same way it does with bar and group labels.
Suggested by Tristan Miller
I cannot get it to work with:
\usepgfplotslibrary{external}
\tikzexternalize
Any advice?
Thanks,
Michel
as proposed by Scott Pakin on 26.07.2017
"... I found that pgfgantt is incompatible with the amsgen package, which is loaded by amsmath, which is loaded by numerous other packages. For complete details and a sample LaTeX file that showcases the problem, see the comp.text.tex thread, "Conflict between mathtools and pgfgantt":
https://groups.google.com/forum/#!topic/comp.text.tex/6GFVD_iC__I
(I at first thought mathtools was the culprint, hence the name of the
thread.)
In short, amsgen redefines @ifstar, and that confuses pgfgantt. I've attached an updated pgfgantt that explicitly uses LaTeX2e'e original @ifstar (or rather, something equivalent to it) to make the package robust to amsgen's redefinition. ... "
pgfgantt.tar.gz
Handle years and decades in a manner similar to weeks and months.
Christian Buhtz proposed this extension in 20170417
https://tex.stackexchange.com/questions/364944/expand-a-gantt-chart-automatically-
to-textwidth-of-a-page
Hi,
I noticed that there is some problems with fairly trivial style lists because latexmk noticed errors although the output is fine(?). Even some examples from the manual produce warnings/errors in the output, namely Missing character: There is no , in font nullfont!
where the character is taken from misparsed parts of the style list. In small cases there is only one such warning but if the misparsed parts a longer there is one such line per character.
This happens with quite up-to-date texlive installations like the one from overleaf.com as well as my old one (2018).
I have treated this as a blackbox problem and just tried to come up with some MWEs and noticed that it is really weird... take a look:
\documentclass{article}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}[
% vgrid={*1{red}, *1{blue}} % Missing character: There is no , in font nullfont!
% vgrid={*1{red}, *{1}{blue}} % Missing character: There is no , in font nullfont!
% vgrid={*1{red}, *1{blue}} % Missing character: There is no , in font nullfont!
% vgrid={*1{red}, *2{blue}} % Missing character: There is no , in font nullfont!
% vgrid={*1{red}, *3{blue}} % no error
% vgrid={*1{red}, *4{blue}} % no error
% vgrid={*1{red}, *5{blue}} % Missing character: There is no , in font nullfont!
% vgrid={*1{red}, *6{blue}} % no error
% vgrid={*1{red}, *7{blue}} % no error
% vgrid={*1{red}, *{8}{blue}} % Missing character: There is no , in font nullfont!
% vgrid={*1{red}, *8{blue}} % Missing character: There is no , in font nullfont!
% vgrid={*2{red}, *8{blue}} % no error
% vgrid={*2{red}, *{8}{blue}} % no error
% vgrid={*1{red}, *9{blue}} % no error
% vgrid={*1{red}, *{9}{blue}} % no error
% vgrid={*1{red}, *{10}{blue}} % no error
]
{1}{20}
\end{ganttchart}
\end{document}
Maybe it is more obvious when looking at the code but I don't see the pattern just like that - and my (la)tex foo is probably way worse than yours so... I am outta here ;)
It would be really nice to have in the document a real-world example of say a project that takes up a year or is multi-year so that various settings could be understood better.
The questions below are all issues I've struggled with when using this package:
\ganttmilestone
s to show up as the diamonds they are supposed to be?\ganttgroup
s to have the triangular ticks appropriately?expand chart=0.9\textwidth
affect things like the group height
or the width of things? How does one format the background color for the various labels?month
but still be able to use the dates for groups/bars/milestones and have them display properly? (most of the examples use the integer notation, not dates)For instance, it would be helpful to have an example similar to this below:
%------------------------------------------------------------
% settings
%------------------------------------------------------------
\ganttset{
y unit chart=0.60cm,
expand chart=0.9\textwidth,
% grids
hgrid,
vgrid={
% ...reorder for the start month
*{30}{draw=none},*{1}{dotted}, % january
*{27}{draw=none},*{1}{dotted}, % february
*{30}{draw=none},*{1}{dotted}, % march
*{29}{draw=none},*{1}{dotted}, % april
*{30}{draw=none},*{1}{dotted}, % may
*{29}{draw=none},*{1}{dotted}, % june
*{30}{draw=none},*{1}{dotted}, % july
*{30}{draw=none},*{1}{dotted}, % august
*{29}{draw=none},*{1}{dotted}, % september
*{30}{draw=none},*{1}{dotted}, % october
*{29}{draw=none},*{1}{dotted}, % november
*{30}{draw=none},*{1}{dotted} % december
},
% time settings
time slot format=big-endian,
% title settings
title height=0.90,
% group settings
group left shift=-0.1,
group right shift=0.1,
group top shift=0.2,
group height=0.6,
group peaks width=4.0,
group label font={\bfseries\scriptsize},
% bar settings
bar label font={\itshape\tiny},
% milestone settings
milestone label font={\bfseries\scriptsize},
milestone height=0.6,
% today settings
today=2021.04.27,
today label={today},
today label font={\itshape\scriptsize},
today rule/.style={dashed, line width=0.75pt}
}
%------------------------------------------------------------
% chart
%------------------------------------------------------------
\begin{ganttchart}
{2021.01.01} % start date
{2022.12.31} % end date
%--------------------------------------------------
% year title bar
\gantttitlecalendar*[
title label font={\bfseries}
]
{2021.01.01} % start date
{2022.12.31} % end date
{year}
\\
%--------------------------------------------------
% month title bar
\gantttitlecalendar*[
title label font={\itshape\scriptsize}
]
{2021.01.01} % start date
{2022.12.31} % end date
{month=shortname}
\\
%--------------------------------------------------
% group
\ganttgroup[
group/.append style={draw=black, fill=blue!50}
]
{Group 1}
{2021.01.01} % start date
{2021.03.01} % end date
\\
%--------------------------------------------------
% bar
\ganttbar[
bar/.append style={draw=black, fill=blue!25}
]
{Task 1}
{2021.01.15}
{2021.02.15}
\\
%--------------------------------------------------
% milestone
\ganttmilestone[
milestone/.append style={draw=black, fill=blue!25}
]
{Milestone 1}
{2021.04.15}
\\
%--------------------------------------------------
% group w/ continuation
\ganttgroup[
group/.append style={draw=black, fill=green!50}
]
{Group 2}
{2021.01.01} % start date
{2021.03.01} % end date
\ganttgroup[
group/.append style={draw=black, fill=green!50}
]
{}
{2021.05.01} % start date
{2022.06.01} % end date
\\
%--------------------------------------------------
% bar w/ continuation
\ganttbar[
bar/.append style={draw=black, fill=green!25}
]
{Task 2}
{2021.06.15}
{2022.02.15}
\ganttbar[
bar/.append style={draw=black, fill=green!25}
]
{}
{2022.04.15}
{2022.05.15}
\\
%--------------------------------------------------
% milestone w/ continuation
\ganttmilestone[
milestone/.append style={draw=black, fill=green!25}
]
{Milestone 2}
{2022.04.15}
\ganttmilestone[
milestone/.append style={draw=black, fill=green!25}
]
{}
{2022.05.15}
\\
%--------------------------------------------------
\end{ganttchart}
I am not bad at programming but the LaTeX coding of packages is still something I struggle with.
as proposed by Paul Gessler on 20171107
Feature request: Would like to use pgfgantt to visualize events with more precise time alignment. An input of unix seconds as the date, for example would allow study of events and their alignment. Similarly, I would like to visualize multi-year or multi-century events to see their overlap or diagram their relations. (for example use pgfgantt to draw a map of arbitrary events in a database for comparison of their relation in time)
Seems like I could cheat by using days as seconds and derive a function to calculate decimals thereof, and come up with appropriate labeling, but I expect that would cause some out of bounds issues and there must be a better way.
My application uses 8 hexadecimal bytes to represent unix seconds (eg now is 5a95b8e7. Would be amazing if I could use that number directly to identify time in charts. Thank you!
Dear pgfgantt users,
after more than ten years of maintaining pgfgantt (the first version was published on CTAN in November 2011), I would like to pass the baton and appoint a new project owner.
I am really grateful that the package has been received well by the community and is apparently still regularly used. Yet, due to my professional development, I actually have not been using the package myself in years and thus feel that I am no longer the ideal candidate for its further development and support.
If you are interested in becoming the Current Maintainer according to the LPPL, please contact me via email. Ideally, you have prior experience with TikZ and pgfgantt, but anyone enthusiastic about the package and its future will be warmly welcome.
Thank you
Wolfgang
Hello,
Someone on tex.stackexchange requested a "weekdays only" key for ganttchart
that only includes weekends in its drawing and calculations. I wrote a pretty
complete implementation of this in response (though I haven't tested it all that
thoroughly). It could be a good thing to add to the package.
A tex document is attached with the full code. A more complete explanation of
how it works is here:
https://tex.stackexchange.com/questions/176095/how-to-exclude-or-remove-
weekends-from-ganttchart/341133#341133
Thanks,
Hood Chatham
See Manuel Kühner's solution at https://topanswers.xyz/tex?q=2018
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.