Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OS Dashboards v 2.0.1
Describe the issue:
Documentation for Gantt Chart says: “The duration is the amount of time to add to the start time.”
Currently my Document contains a “creationDate” and “finalsiationDate”.
I have created a painless scripted field to extract the “task_duration” which looks like:
def diff = doc['finalisationDate'].value.getMillis() - doc['creationDate'].value.getMillis(); return new SimpleDateFormat('HH:mm:ss.SSS').format(diff);
Which has a type of “Date” - however selecting this as the Gantt Chart’s Event Duration appears to return no data.
I suspect that my return type just isn’t formatted correctly but I’m unsure how it should be formatted. Is it expecting an interval or duration data type? should I leave it as total milliseconds?
Hi @zane - I’m actually not sure, and I agree that the description text is ambiguous. It appears to me that you should probably just leave it in milliseconds, because a plain numeric type seems to work: playground example.
It’s also annoying that there doesn’t appear to be a way to specify the interval or duration type.
However I also noticed that since the gantt chart can’t seem to be expanded past 24 hours - so if the Event started more than 24 hours ago then the graph just draws nothing so while the script does work - the chart still doesn’t.
Maybe this chart type is just too specific - and perhaps a more generic “broken bar” would be easier to use for a general case