Darakah / obsidian-timelines

Create a timeline view of all notes with the specified combination of tags
MIT License
353 stars 34 forks source link

how to active the Horizantal Timeline mode? #54

Open beeky86 opened 1 year ago

beeky86 commented 1 year ago

Vertical Timeline is successfully enabled by the following examples:

Example
---
tags: [tlt, test]
---
<span 
class='ob-timelines' 
data-date='2000-08-21'
data-title='title'
data-class='orange'
data-img='test.jpg'
data-type='range'
data-end="2024-08-21">
    test
</span>

 ` ` `timeline
 test
` ` `

but i wander how to active the Horizantal Timeline mode? i don't find examples in README.md cause the VIDEO BRIEF EXAMPLE is not available in my areas for some reason

beeky86 commented 1 year ago

```timeline-vis
tags=2
startDate=2020
endDate=2023
fivHeight=8
minDate=10
seanlowe commented 1 year ago

Documentation is lacking here but going through the code you can find the list of horizontal arguments here.

For ease of access I've copied it here:

let args = {
    tags: '',
    divHeight: 400,
    startDate: '-1000',
    endDate: '3000',
    minDate: '-3000',
    maxDate: '3000'
};

According to this you can set up the horizontal timeline like so:

```timeline-vis tags=2 startDate=2020 endDate=2023 divHeight=500 minDate=2020 maxDate=2023 ```

The min/max date arguments make sure you can't scroll in to see individual seconds of the timeline or scroll out to see out to the year 2500.