Skip to content

Real volume bars in PriceChart histogram #153

@ozpool

Description

@ozpool

Problem

PriceChart.tsx feeds the volume histogram (bottom of chart) with Math.random() * 200 per tick. The bars look alive but mean nothing.

Proposal

Once #152 (candle store) lands, the volume field on each Candle is already populated. Drop the random call and read it directly:

volSeries.setData(candles.map(c => ({
  time: c.time,
  value: c.volume,
  color: c.close >= c.open ? "rgba(15, 165, 106, 0.45)" : "rgba(214, 48, 68, 0.45)",
})));

Live updates pick up volume from the same WS candle-update channel emitted by the bucket roll.

Acceptance

  • Volume bars scale to actual fills.
  • No bar appears in a minute with zero fills.

Depends on

#152

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions