Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: added stop time to timeline tooltip (fixes #200 (comment))
  • Loading branch information
ErikBjare committed Nov 2, 2020
1 parent 8e886b4 commit f0e8b4c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/util/tooltip.js
Expand Up @@ -34,9 +34,11 @@ export function buildTooltip(bucket, e) {
<tr><td>Data:</td><td>${sanitize(JSON.stringify(e.data))}</td></tr>
`;
}
return `<table>${inner}
return `<table>
<tr></tr>
<tr><th>Time:</th><td>${moment(e.timestamp).format()}</td></tr>
<tr><th>Start:</th><td>${moment(e.timestamp).format()}</td></tr>
<tr><th>Stop:</th><td>${moment(e.timestamp).add(e.duration, 'seconds').format()}</td></tr>
<tr><th>Duration:</th><td>${seconds_to_duration(e.duration)}</td></tr>
${inner}
</table>`;
}

0 comments on commit f0e8b4c

Please sign in to comment.