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

i want to keep unit zoom level #917

Open
stone89son opened this issue Oct 17, 2023 · 1 comment
Open

i want to keep unit zoom level #917

stone89son opened this issue Oct 17, 2023 · 1 comment

Comments

@stone89son
Copy link

Default display :

1

I expect it to show up:
2

I had setting zoom level but not working.

@ivanreis96
Copy link

ivanreis96 commented Oct 8, 2024

You should try to setup the props something like this:
<Timeline
items={itemsTimeline}
groups={groupsTimeline}
sidebarWidth={165}
defaultTimeStart={moment().add(-15, 'day')}
defaultTimeEnd={moment().add(15, 'day')}
minZoom={moment.duration(5, 'days').asMilliseconds()}
maxZoom={moment.duration(12, 'months').asMilliseconds()}
stackItems
canMove={false}
canResize={false}
itemHeightRatio={0.2}
lineHeight={20}
itemRenderer={CustomItemRendererWrapper}
groupRenderer={CustomGroupRendererWrapper}
/>

  these are the importants lines:
   defaultTimeStart={moment().add(-15, 'day')}
    defaultTimeEnd={moment().add(15, 'day')}

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