Skip to content

feat: add footprint table mode and bar analysis#133

Open
Niketion wants to merge 5 commits into
flowsurface-rs:mainfrom
Niketion:feat/footprint-table-bar-analysis-pr
Open

feat: add footprint table mode and bar analysis#133
Niketion wants to merge 5 commits into
flowsurface-rs:mainfrom
Niketion:feat/footprint-table-bar-analysis-pr

Conversation

@Niketion

Copy link
Copy Markdown
Contributor

Summary

Adds a focused footprint chart improvement with a new table-based cluster view, table-specific display controls, and a
dedicated Bar Analysis indicator. Broader per-indicator configuration and custom color settings are intentionally left for a
follow-up PR.

Modified files

data/src/chart/indicator.rs

  • Adds KlineIndicator::BarAnalysis.
  • Registers Bar Analysis for spot and perpetual markets.
  • Adds the display label Bar Analysis.

data/src/chart/kline.rs

  • Adds ClusterKind::Table.
  • Includes Table in ClusterKind::ALL.
  • Updates cluster quantity handling so table mode uses bid/ask max quantity.
  • Adds show_footprint_summary to kline visual config.
  • Adds show_footprint_table_candle to kline visual config.
  • Defaults footprint summary to enabled.
  • Defaults table candle display to disabled.

src/chart/indicator/kline.rs

  • Registers the new bar_analysis module.
  • Adds factory support for KlineIndicator::BarAnalysis.

src/chart/indicator/kline/bar_analysis.rs

  • Adds the new Bar Analysis indicator.
  • Builds per-bar rows from FootprintSummary.
  • Displays ask, bid, volume, delta, and delta percentage.
  • Supports both time-based and tick-based kline data.
  • Rebuilds when klines, trades, tick size, or basis change.

src/chart/kline.rs

  • Renders the new footprint Table cluster type.
  • Draws ask/sell quantity cells on the left and bid/buy quantity cells on the right.
  • Draws table grid borders.
  • Applies existing imbalance highlighting inside table cells.
  • Skips NPoC line rendering for table mode.
  • Adds optional candle rendering next to table clusters when show_footprint_table_candle is enabled.
  • Respects show_footprint_summary when drawing per-bar footprint summary labels.
  • Skips extra autoscale padding for summary labels when summary display is disabled.
  • Prevents BarAnalysis from rendering on candlestick charts.
  • Prevents BarAnalysis from being toggled on candlestick charts.
  • Sanitizes chart state so Table + NPoC is removed when loading or switching cluster type.
  • Filters NPoC out of studies when table mode is active.

src/modal/pane/indicators.rs

  • Filters Bar Analysis out of the indicator modal for candlestick charts.
  • Keeps Bar Analysis available only when the current pane is a footprint chart.

src/modal/pane/settings.rs

  • Adds a Show footprint summary checkbox.
  • Adds a Show table candle checkbox, visible only when cluster type is Table.
  • Hides Cluster scaling controls when cluster type is Table.
  • Filters Naked Point of Control out of available studies when cluster type is Table.
  • Adds support for rendering a filtered study list in the generic study configurator.

src/screen/dashboard/pane.rs

  • Filters Bar Analysis out when initializing candlestick chart indicators.
  • Blocks Bar Analysis toggles on candlestick charts.
  • Keeps pane/chart kind state synchronized after unsupported footprint studies are removed.

Deferred

Intentionally left for later PRs:

  • Per-indicator persistent settings.
  • Custom indicator colors.
  • Custom footprint study colors.
  • Broader indicator settings UI refactors.

Validation

  • cargo fmt --check
  • cargo check
  • git diff --check
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant