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

[FEATURE] gantt-chart: add ability to change unit of event duration #256

Open
hashar opened this issue Sep 20, 2023 · 0 comments
Open

[FEATURE] gantt-chart: add ability to change unit of event duration #256

hashar opened this issue Sep 20, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@hashar
Copy link

hashar commented Sep 20, 2023

Is your feature request related to a problem?

We have events respecting the Elastic Common Schema (ECS) specification which defines an event duration as nanoseconds (I am using https://doc.wikimedia.org/ecs/ as a reference). The duration in nanoseconds is added to the start date which is in milliseconds in JavaScript. The end result is I get the chart misrepresented with event ranging up to year 2054 or so :)

What solution would you like?

The ECS format for an event has:

Field Type
event.start date
event.end date
event.duration nanoseconds

When one has the end time, the vizualization could have an End time field which, when set, would take precedence over duration. The duration of the events will then calculated using the same unit (milliseconds date - milliseconds date).

When there is no end time, the plugin could have a selection list to let one mention the unit used by the duration field (seconds, milliseconds, microseconds, nanoseconds, other) with other letting one specify whatever resolution they might (eg the ability to enter 9 for nanoseconds).

What alternatives have you considered?

I though about detecting the unit of the duration field but if you have short events how can you tell whether 1000 is in nanoseconds or milliseconds?

Do you have any additional context?

@hashar hashar added enhancement New feature or request untriaged labels Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants