Volume Profile

Preview

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/volume-profile

API Reference

VolumeProfile

data
readonly VolumeProfileBin[]

Already-aggregated executed volume. Sorted by price; unequal bins and gaps are supported.

Default—
label?
string
Default—
unit?
string
Default—
formatPrice?
((price: number) => string)
Default—
formatVolume?
((volume: number) => string)
Default—
valueArea?
number | false

Target fraction, default 0.7. Whole bins may cover less; the POC is always included. Set false to hide the value area. Equal-volume POCs favor the lower price.

Default—
color?
string
Default—
pocColor?
string
Default—
activeId?
string | null
Default—
defaultActiveId?
string | null
Default—
onActiveChange?
((id: string | null) => void)
Default—
labels?
Partial<{ label: string; unit: string; empty: string; inspect: string; caption: string; priceRange: string; volume: string; share: string; level: string; range: string; amount: string; shareOfTotal: string; ... 6 more ...; shareOfVolume: string; }>

Override any built-in string.

Default—
className?
string
Default—

VolumeProfilePlot

className?
string
Default—
barClassName?
string
Default—
showAxes?
boolean

Plot height is set by className; default 20rem.

Defaulttrue

VolumeProfileSummary

className?
string
Default—

VolumeProfileTooltip

className?
string
Default—
side?
"top" | "right" | "bottom" | "left"
Defaulttop

Updated