Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom gridlines #9

Open
John-Toohey opened this issue Nov 27, 2024 · 5 comments
Open

Support custom gridlines #9

John-Toohey opened this issue Nov 27, 2024 · 5 comments

Comments

@John-Toohey
Copy link

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):

image

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.

@pta2002
Copy link
Owner

pta2002 commented Nov 29, 2024

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?

@John-Toohey
Copy link
Author

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:

image

Notice how months and weeks both have separate gridlines.

@pta2002
Copy link
Owner

pta2002 commented Dec 1, 2024

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.

@John-Toohey
Copy link
Author

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.

@pta2002
Copy link
Owner

pta2002 commented Dec 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants