Skip to content

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

@hashar

Description

@hashar

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions