(v: number)
| 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 ( |