Skip to content

Commit f0e8b4c

Browse files
committed
feat: added stop time to timeline tooltip (fixes #200 (comment))
1 parent 8e886b4 commit f0e8b4c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/util/tooltip.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ export function buildTooltip(bucket, e) {
3434
<tr><td>Data:</td><td>${sanitize(JSON.stringify(e.data))}</td></tr>
3535
`;
3636
}
37-
return `<table>${inner}
37+
return `<table>
3838
<tr></tr>
39-
<tr><th>Time:</th><td>${moment(e.timestamp).format()}</td></tr>
39+
<tr><th>Start:</th><td>${moment(e.timestamp).format()}</td></tr>
40+
<tr><th>Stop:</th><td>${moment(e.timestamp).add(e.duration, 'seconds').format()}</td></tr>
4041
<tr><th>Duration:</th><td>${seconds_to_duration(e.duration)}</td></tr>
42+
${inner}
4143
</table>`;
4244
}

0 commit comments

Comments
 (0)