Skip to content

fix(frontend): implement dynamic Y-axis scaling for power charts (#723)#726

Draft
CODEAbhinav-art wants to merge 1 commit into
jlab-sensing:mainfrom
CODEAbhinav-art:fix-723
Draft

fix(frontend): implement dynamic Y-axis scaling for power charts (#723)#726
CODEAbhinav-art wants to merge 1 commit into
jlab-sensing:mainfrom
CODEAbhinav-art:fix-723

Conversation

@CODEAbhinav-art
Copy link
Copy Markdown
Contributor

Fixes jlab-sensing/ENTS-node-firmware#326

Changes Proposed:

  • Created a pure utility function formatElectricalUnit to dynamically scale Voltage (V, mV) and Current (A, mA, µA) based on magnitude.

  • Corrected the hardcoded base unit configurations in UnifiedChart.jsx from mV/uA to the standard V/A to reflect the raw STM32 firmware data.

  • Injected the dynamic formatter into the Chart.js Y-axis tick callbacks and Tooltip label callbacks within UniversalChart.jsx.

Status:

Opening this as a Draft PR for early architectural review. I am currently unable to test the UI rendering locally because the dashboard is blocked by the ["cell info"] data is undefined error currently present on main. Once that upstream issue is resolved, I will test the tooltips locally and mark this ready for review.

@jmadden173 jmadden173 added the awaiting-review For PRs that have been looked at and waiting for a review. label Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review For PRs that have been looked at and waiting for a review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Voltage and current units incorrect

2 participants