1
0
mirror of https://github.com/s00500/ESPUI.git synced 2026-01-27 01:32:50 +00:00

Make text labels of data points more readable

This commit is contained in:
blackpencil
2026-01-20 21:06:24 +08:00
parent 32d51125ab
commit 92eba52600
3 changed files with 4 additions and 4 deletions

View File

@@ -172,7 +172,7 @@ function lineGraph(parent, xAccessor, yAccessor) {
var text = document.createElementNS("http://www.w3.org/2000/svg", "text");
// primitive formatting
text.innerHTML = Math.floor(xDataValue) + " / " + Math.floor(yDataValue);
text.innerHTML = new Date(Math.floor(xDataValue)).toLocaleTimeString() + " / " + Math.floor(yDataValue);
text.setAttribute("x", x);
text.setAttribute("y", y);