Closed F4zeless closed 1 month ago
No worries, thanks for creating the issue - hopefully we can help figure this out. Could you post an example of what your events (are you using frontmatter or HTML?) and what your ob-timeline
codeblock looks like?
I have been using the frontmatter tags.
Currently I try to run the following codeblock for the timeline:
tags=Government
startDate=1945
endDate=2025
divHeight=600
minDate=1940
maxDate=2030
ZoomInLimit=week
ZoomOutLimit=315360000000000
type=flat
if I leave out the last statetement it renders vertically and as far as I can tell, correctly:
tags=Government
startDate=1945
endDate=2025
divHeight=600
minDate=1940
maxDate=2030
ZoomInLimit=week
ZoomOutLimit=315360000000000
Are there certain types of events which break the hoizontal rendering?
so far as I can tell it should work...
I see an issue, not sure if it's the issue yet. The ZoomInLimit
and ZoomOutLimit
are capitalized. Try only changing the Z
to lowercase and see what that does.
There is an item on my todo list to provide more discrete feedback should there be a parsing error in the codeblock but I haven't gotten to it yet.
I tried it, but it does not seem to make a difference
Hm... Alright, in the plugin settings there's a toggle for "debug mode" at the bottom. Flip that on, then go to where your codeblock is. Hit Ctrl + Shift + I
to open up the dev tools inside obsidian. Open up the console, (probably clear it out first) and then try to render the timeline.
It'll spit out a TON of info - mostly I want to see if there are any errors.
If there aren't we can look at the warnings, which there might be
There are 2 errors at the end of the log
vis-timeline-graph2d.js:11284 Uncaught (in promise) TypeError: Unknown item type "red"
at eval (vis-timeline-graph2d.js:11284:17)
at Array.forEach (
Seems to have to do with red as color? I have issues with copying the whole log as its to long.
Hmm.. This tells me what file the error is occurring in (block.ts
) and what function (buildHorizontalTimeline
) but not where the error is occurring.
Could you provide one or two examples of the frontmatter in your notes so I can recreate the problem?
example background
description: Coalition Parties:
example event:
title: description: color: red type: box startDate: 1971-10-10 endDate: 1971-10-10 era: path: "" tags:
I Just found the issue myself. By accident i attributed one event as type = red instead of type = box. I am not sure why this is not an issue with vertical rendering. Maybe the type is not considered? Nevertheless thankfull for your time!
As for why it does not affect the vertical timeline, really the only keyword that matter to the vertical one (for right now) is tags
. None of the rest of them do anything for the vertical timeline.
Glad you figured it out. I do think the malformed / bad input notice should be bumped up in priority lol. Would have made finding this a lot easier for you.
Pretty much the issue in the title.
I am creating a timeline of roughly 40-50 events atm. No pictures, just plain text and links. The timeline renders all the events in the default vertical style. However, when I use the type = flat argument it does not render anymore.
Sorry if notation of issue is untypical. Its my first time using github.