seanlowe / obsidian-timelines

Create a timeline view of all notes with the specified combination of tags
https://seanlowe.github.io/obsidian-timelines/
MIT License
39 stars 2 forks source link

[Feature Request] Implement timeline groups / subgroups #62

Open zzxii opened 1 week ago

zzxii commented 1 week ago

If I have 2 events that have overlapping dates (event1a and event 2a) and they have following events (event1b and event2b) with overlapping dates. The vertical sorting and vertical ordering seems to be unorganized. Is there a parameter to set the sort, if not it seems to be inconsistent. Zooming in and out also causes the events to move in their vertical location. #Bug? Edit: grammar. Timelines event sorting horizontal

seanlowe commented 1 week ago

Just for clarification, by "vertical sorting" I'm understanding you're referring to something like the "weight" of the item -- what items get rendered on bottom versus above?

The library in question, vis-timeline, has a kinda-sorta-half similar functionality through the use of groups and subgroups but so far as I am aware, there's no ability to influence how the events are rendered otherwise.

zzxii commented 1 week ago

@seanlowe you are correct, I am referring to the "weight." The order in which 2 events display from top to bottom. Is there no way to set this? Not even alphabetically/numerically? Is it 100% random? In my above image example it would be ideal if event1a and event 1b fall in line with each other while event2a and event2b also fall in line with each other. In the mean time I will look at the use of groups and report back with my findings.... assuming groups is enabled in your code? Edit: grammar.

seanlowe commented 1 week ago

Unfortunately yes. vis-timeline is pretty much the only library available to create timelines like this and from looking at the docs, I see nothing that would allow someone to manually order the events vertically. From what I found on the previous iteration of vis-timeline, there was an issue that talked about using subgroups to put things on the same level but not sure how involved this is.

zzxii commented 1 week ago

@seanlowe Thanks for the link. Could you post an example of what the frontmatter property would be for the "groups"? I tried groups=group1 at the end of my front matter with no luck.

seanlowe commented 1 week ago

As of right now, there is no support for groups within the bounds of the plugin. If you end up tinkering with the library (in plain HTML or some such) then I'd happily take your findings and put them towards support in the plugin.

I'd need to have a clear idea of what's needed before I can start on putting it into the plugin since I'm already working on a couple other things currently.

zzxii commented 1 week ago

Thank you for the quick replies. For the time being can we change this thread to be a "feature request" to add the group function as is found in visjs/vis-timeline to your plugin? In the mean time I will look to tinker on my end. No promises that my results will result in a anything positive.

seanlowe commented 1 week ago

Sure thing! Thanks for creating the issue! If you end up tinkering on it, let me know how it goes. I'll comment here if I start to build it into the plugin.