typst-timeliney
typst-timeliney copied to clipboard
Support custom gridlines
Whilst for most gantt charts, a single grid is fine; sometimes you might want to have multiple. Take, for example, the following chart, which plots a relatively small amount of time (generated via typst-timeliney, but done so by manipulating data from a yaml file):
It could be useful to have both a grid for the months; or a grid for the weeks. Owing to its complexity and lack of uniform grid sizes, it could help to have the ability to have a gridline() function --- similar to the grid.line function in typst and most likely working in a similar way to how milestones are handled.
If this is a feature which you would be willing to support (which, in honesty, I could see why you wouldn't want to); I would be happy to implement it.
Thank you, nonetheless, for this library.
Hi, thanks for the request! I am not sure I see what you mean, do you think you could do some sketch of what it would look like? Do you mean two overlapping grids?
Well, it so happened that I ended up writing a completely separate proto library to deal with what I want, but the output I envisioned was:
Notice how months and weeks both have separate gridlines.
I see, thanks for mocking it up!
I am not able to work on this ATM since I am quite busy between work and finishing my master's thesis, but if you make a PR for it I am more than willing to merge it.
I ended up creating my own library for this. My motivation for this was that I specifically wanted to work with datetimes in a simple manner. I initially had planned on writing a wrapper for this library, but the amount of code I was writing to transform the data was comparable to the length of this library: so I ended up writing my own library from scratch to accommodate my needs, Gantty.
Hey, that looks great! Honestly it's kind of what I wanted this library to be. It was mostly done since I needed it for my thesis and then just posted it on GitHub, but didn't properly refine it. Congratulations on it, looks great.