Skip to content

Fix Chart Update#82

Merged
MaddieWright merged 3 commits intomainfrom
chart-fix
Mar 23, 2026
Merged

Fix Chart Update#82
MaddieWright merged 3 commits intomainfrom
chart-fix

Conversation

@MaddieWright
Copy link
Copy Markdown
Collaborator

What?

Improved the Chart View node's graph and data table for better EEG signal readability.

  • Y-axis now auto-scales to actual signal range (µV) with labeled axis and 50 tick marks
  • Replaced yellow Signal 4 colour with red for visibility
  • Added a scrollable Brush component on the X-axis so users can pan through buffered data without losing their scroll position across start/stop cycles
  • Added a display info bar showing buffered point count, visible time window, and full time range
  • Data table now shows last 50 rows with an "Expand full table" dialog to view all buffered data points
  • Fixed timestamp formatting to support sub-second precision (HH:MM:SS.mmm) for both ISO 8601 and space-separated formats
  • Increased chart data buffer from 20 to 500 points so the table and chart have enough data to render

How?

  • signal-graph-full.tsx: Added Recharts Brush with controlled startIndex/endIndex state that persists across re-renders; brush position is preserved on stream stop/start and only resets when brushRange state is cleared. Display info bar computes visible sample count dynamically from brush indices. Table uses a Dialog for the expanded view.
  • signal-graph-node.tsx: Bumped useNodeData chartSize from 20 → 500.
  • WebSocketContext.tsx: Updated formatTimestamp to handle space-separated timestamps and extract milliseconds.
  • data-table.tsx: Added rowCount prop (was hardcoded to 8).
Screenshot 2026-03-23 at 4 05 05 PM Screenshot 2026-03-23 at 4 05 16 PM

@MaddieWright MaddieWright marked this pull request as ready for review March 23, 2026 23:06
@MaddieWright MaddieWright merged commit ffe88b0 into main Mar 23, 2026
1 check failed
@MaddieWright MaddieWright deleted the chart-fix branch March 23, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant