MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / tickMarkFormatter

Function tickMarkFormatter

src/components/ChartPanel.tsx:272–276  ·  view source on GitHub ↗
(time: number, tickMarkType: number)

Source from the content-addressed store, hash-verified

270 };
271
272 const tickMarkFormatter = (time: number, tickMarkType: number) => {
273 // tickMarkType: 0=Year, 1=Month, 2=DayOfMonth, 3=Time, 4=TimeWithSeconds
274 if (tickMarkType <= 2) return fmtTs(time, true);
275 return fmtTs(time, false).slice(-5); // "HH:MM"
276 };
277
278 const chart = lc.createChart(container, {
279 width: Math.floor(width),

Callers

nothing calls this directly

Calls 1

fmtTsFunction · 0.85

Tested by

no test coverage detected