fix(frontend): implement dynamic Y-axis scaling for power charts (#723)#726
Draft
CODEAbhinav-art wants to merge 1 commit into
Draft
fix(frontend): implement dynamic Y-axis scaling for power charts (#723)#726CODEAbhinav-art wants to merge 1 commit into
CODEAbhinav-art wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.