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

Function fmtVol

src/components/ChartPanel.tsx:482–486  ·  view source on GitHub ↗
(v: number)

Source from the content-addressed store, hash-verified

480
481 const fmtPct = (v: number) => (v * 100).toFixed(2) + "%";
482 const fmtVol = (v: number) => {
483 if (v >= 1e6) return `${(v / 1e6).toFixed(1)}M`;
484 if (v >= 1e3) return `${(v / 1e3).toFixed(0)}K`;
485 return Math.round(v).toString();
486 };
487 const showMACDPanel = showMACD && !isMulti && !lineOnly && chartData?.bars && chartData.bars.length >= 26;
488
489 return (

Callers 1

ChartPanelInnerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected