Improve tooltip.
This commit is contained in:
parent
217c0b0028
commit
3f7a343b17
@ -827,13 +827,12 @@ function showEonstripDetail(index, startCob) {
|
||||
const startDate = fromCobiets(ev.cobStart).toLocaleString('en-US', optsShort);
|
||||
const endDate = fromCobiets(ev.cobEnd).toLocaleString('en-US', optsShort);
|
||||
const seriesStart = formatCobieTimestamp(ev.seriesStart);
|
||||
const seriesEnd = isFinite(ev.seriesEnd) ?
|
||||
formatCobieTimestamp(ev.seriesEnd) : '∞';
|
||||
const seriesEnd = isFinite(ev.seriesEnd) ? formatCobieTimestamp(ev.seriesEnd) : '∞';
|
||||
|
||||
tooltip.innerHTML =
|
||||
`<strong>${ev.label}</strong><br>` +
|
||||
`Start: ${startStr} (${startDate})<br>` +
|
||||
`End: ${endStr} (${endDate})<br>` +
|
||||
(ev.cobEnd > ev.cobStart ? `End: ${endStr} (${endDate})<br>` : '') +
|
||||
`Series: ${seriesStart} – ${seriesEnd}`;
|
||||
elem.appendChild(tooltip);
|
||||
timeline.appendChild(elem);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user