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

Using time resolution along with day, month, year #176

Closed
srijeyanthan-cx opened this issue Jan 28, 2022 · 4 comments
Closed

Using time resolution along with day, month, year #176

srijeyanthan-cx opened this issue Jan 28, 2022 · 4 comments
Assignees

Comments

@srijeyanthan-cx
Copy link

How can we change the view format to time showing 24 hours, looks like that view is not supported, can you give some hint on changing the core?

@walkerkay
Copy link
Collaborator

How can we change the view format to time showing 24 hours, looks like that view is not supported, can you give some hint on changing the core?

Hello, srijeyanthan-cerexio, at present, we have no plan to support hourly view. If you are interested, you can submit PR for support, the core code of ngx-gantt view is located in 'packages/gantt/src/ views'. You can add a' hour.ts ` extends GanttView 'to implement a new view. There may be new problems in the implementation process. You can use walkerkay@163.com Email to communicate with me.

@mhosman
Copy link

mhosman commented Feb 25, 2022

It would be great to have a 24 hour view.

@maleet
Copy link

maleet commented Jun 1, 2023

Almost doable with custom day view. But there is core logic there and that makes my date with time to date so I can't calculate bar width.

In this way it works:

gantt-upper.ts:
computeItemsRefs(...items: GanttItemInternal[] | GanttBaselineItemInternal[]) {
items.forEach((item) => {
item.updateRefs({
width: item.start && item.end ? this.view.getDateRangeWidth(item.start, item.end) : 0,
x: item.start ? this.view.getXPointByDate(item.start) : 0,
y: (this.styles.lineHeight - this.styles.barHeight) / 2 - 1
});
});
}

@walkerkay walkerkay self-assigned this Mar 11, 2024
@walkerkay
Copy link
Collaborator

@worktile/gantt@17.0.0-next.0 supports hour view.

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

4 participants