Skip to content

Commit 78928f9

Browse files
committed
show ms in charts
1 parent c7a951f commit 78928f9

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

ethernet-view/src/components/ChartMenu/ChartElement/ChartCanvas/ChartCanvas.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,17 @@ export const ChartCanvas = ({ measurementsInChart }: Props) => {
5858
fixRightEdge: true,
5959
lockVisibleTimeRangeOnResize: true,
6060
rightBarStaysOnScroll: true,
61+
tickMarkFormatter: (time: UTCTimestamp) => {
62+
const date = new Date(time * 1000);
63+
return date.toLocaleTimeString() + '.' + date.getMilliseconds();
64+
}
6165
},
66+
localization: {
67+
timeFormatter: (time: UTCTimestamp) => {
68+
const date = new Date(time * 1000);
69+
return date.toLocaleTimeString() + '.' + date.getMilliseconds();
70+
}
71+
}
6272
});
6373
}
6474
}

ethernet-view/src/pages/LoggerPage/ChartsColumn/ChartMenu/ChartElement/ChartCanvas.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,17 @@ export const ChartCanvas = ({
4949
fixLeftEdge: true,
5050
fixRightEdge: true,
5151
lockVisibleTimeRangeOnResize: true,
52+
tickMarkFormatter: (time: UTCTimestamp) => {
53+
const date = new Date(time * 1000);
54+
return date.toLocaleTimeString() + '.' + date.getMilliseconds();
55+
},
5256
},
57+
localization: {
58+
timeFormatter: (time: UTCTimestamp) => {
59+
const date = new Date(time * 1000);
60+
return date.toLocaleTimeString() + '.' + date.getMilliseconds();
61+
}
62+
}
5363
});
5464
}
5565

0 commit comments

Comments
 (0)