[WIDGET] Trilium Timeline - A simple integration of vis.js that displays fetched notes as dates on a timeline #1588
-
UPDATE: this is still regularly updated and has been cleaned-up and made more easily configurable, check the repo and the README of that repo, link below. https://gitlab.com/MorganeLeCaignec/trilium-timeline Hey there. This code is made for my own purposes and it's not the best, you'll also have to modify a bunch of values to what you need (name of labels it grabs, name of groups, default zoom/start time, etc..) Tell me what you think and don't be afraid to ask me if you've got issues making it work ! There's also a lot of ways to improve this, so feel free to suggest them and send me your fixes/improvements. |
Beta Was this translation helpful? Give feedback.
Replies: 16 comments 22 replies
-
Very cool! |
Beta Was this translation helpful? Give feedback.
-
I had to look twice at your preview to understand these wrong dates, only to realize that you're a Pathfinder fan! Very interesting implementation and thanks for your contribution |
Beta Was this translation helpful? Give feedback.
-
I've put this into a little repo so it's easier to track the few changes i've made. Here's it is : https://gitlab.com/MorganeLeCaignec/trilium-timeline |
Beta Was this translation helpful? Give feedback.
-
I've updated the repo in the same way I updated my hexmap widget (https://gitlab.com/MorganeLeCaignec/trilium-hexmap), with a ready-to-import .zip file since manually zipping and importing the source files wasn't working. |
Beta Was this translation helpful? Give feedback.
-
This should be a default feature in Trilium . |
Beta Was this translation helpful? Give feedback.
-
I am trying to get this to work, but I gives me the follow error code: Execution of JS note "render.html" with ID xg1yzvuegTm3 failed with error: Malformed arrow function parameter list And in the script.js there is this error message: |
Beta Was this translation helpful? Give feedback.
-
Concerning your question, I would like to use it, removing all your personal tags/categories from the code and do that from attributes instead would make things a lot easier to use :-) |
Beta Was this translation helpful? Give feedback.
-
I updated the repo to version 1.1, this is a big update! I moved all my personal labels/logic into customizable attributes with no need to change the source code. This took some effort (and required the addition of a few special cases that are a bit weird), but it means you can now customize this to use your own labels and define your own groups! This also makes it a bit complicated to understand and use (especially the groups), but I added a working example in the Widget as well as detailed explanations in the README file. Get it here : https://gitlab.com/MorganeLeCaignec/trilium-timeline |
Beta Was this translation helpful? Give feedback.
-
Updated to 1.2 for trilium version 0.48.3. This is just a precaution because everything still worked, but I tweaked the script a bit and moved things into an async function. Some slight update to the README and such. |
Beta Was this translation helpful? Give feedback.
-
Hello Mr. Le Caignec, Sorry for coming to you so "late": I've just discovered your script and it might be a life-saver (I'm a student, and in order to memorize the historical knowledge I've been compiling in Trilium, timeline charts are a must).
and trying quick alternatives (like "~0004")... unsuccessfully: the chart registers "-4" as "4" for the event. Yet the timeline does display B.C. dates (-500, -1000, ...). Looking forward to your answer! |
Beta Was this translation helpful? Give feedback.
-
Updated to 1.3 for trilium version 0.50.2+. I fixed a bug where negative dates were not being parsed properly, and added a working example of a negative date in the examples. |
Beta Was this translation helpful? Give feedback.
-
Hey, @QuentinLeCaignec I was trying to integrate your timeline plugin with my to-do notes plugin, but couldn't figure out. I have multiple to-do lists from multiple projects that are separated by these categories: Archive, Backlog, Done, In Progress. I need to show in a timeline all notes from backlog from all projects that have the due date label set. Here's how I filter them using the built-in search engine: I'm using Collection Views plugin just to show you how I get them and which attributes I've used to get the information required. Do you think I could achieve this with your plugin? Best regards, |
Beta Was this translation helpful? Give feedback.
-
Updated to 1.5 for trilium 0.54.2, refactors/cleans up code. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Updated to 1.7 for 0.62.4 ! |
Beta Was this translation helpful? Give feedback.
-
Updated to 1.8, still for 0.62.4 but should work perfectly for 0.63.x versions, no breaking changes. Added an optional feature (can be toggled off using the can_day_click label on the widget, see the README) which creates a new day note when clicking on the day label at the bottom of the view (thanks to @FliegendeWurst). Only limitation, when the view is zoomed in a month or year scale out the note will still be created based on where exactly the mouse was clicked (at the left or right of the month label for example), so it still knows which day is clicked but the day isn't visible to the user in this view, which is not very intuitive. |
Beta Was this translation helpful? Give feedback.
Updated to 1.8, still for 0.62.4 but should work perfectly for 0.63.x versions, no breaking changes.
Added an optional feature (can be toggled off using the can_day_click label on the widget, see the README) which creates a new day note when clicking on the day label at the bottom of the view (thanks to @FliegendeWurst).
Only limitation, when the view is zoomed in a month or year scale out the note will still be created based on where exactly the mouse was clicked (at the left or right of the month label for example), so it still knows which day is clicked but the day isn't visible to the user in this view, which is not very intuitive.