MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / createLogCountPerHour

Function createLogCountPerHour

scripts/ufs_statistic.js:195–205  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

193 const interpolation = { type: "smooth" };
194
195 function createLogCountPerHour(data) {
196 const logsCountPerHour = Array(24).fill(0);
197 data.forEach((data) => {
198 const hour = data.time.getHours();
199 logsCountPerHour[hour]++;
200 });
201 return logsCountPerHour.map((_, i) => ({
202 x: i + "",
203 y: _,
204 }));
205 }
206
207 const chartContainer = document.createElement("div");
208 chartContainer.id = "ag-charts";

Callers 2

onDocumentEndFunction · 0.85
onFilterChangedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected