-
Notifications
You must be signed in to change notification settings - Fork 5
upgrade to jsroot 7.9.0 #2066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade to jsroot 7.9.0 #2066
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the jsroot dependency and refactors histogram value assignments across components while adding a debugging console.log.
- Updated jsroot from ^7.8.2 to ^7.9.0
- Replaced fYaxis.fXmin/fXmax with fMinimum/fMaximum in three components
- Added a debugging console.log in JsRootGraph1D
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/JsRoot/components/JsRootMultiGraph1D.tsx | Refactored histogram min/max assignment |
| src/JsRoot/components/JsRootGraph2D.tsx | Refactored histogram min/max assignment |
| src/JsRoot/components/JsRootGraph1D.tsx | Refactored histogram min/max assignment and added console.log for debugging |
| package.json | Upgraded jsroot dependency |
Comments suppressed due to low confidence (1)
src/JsRoot/components/JsRootGraph1D.tsx:30
- [nitpick] A console.log statement was added for debugging purposes. Consider removing or gating this debugging output for production builds.
console.log('histogram', histogram);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the jsroot dependency to version 7.9.0 and refactors histogram minimum and maximum assignments across multiple graph components.
- Upgrades jsroot dependency in package.json
- Refactors histogram value assignments from using fYaxis.fXmin/fXmax to fMinimum/fMaximum in JsRootGraph1D, JsRootGraph2D, and JsRootMultiGraph1D
- Introduces minor adjustments to how computed maximum values are scaled by a constant factor
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/JsRoot/components/JsRootMultiGraph1D.tsx | Updated histogram property assignments to use fMinimum and fMaximum |
| src/JsRoot/components/JsRootGraph2D.tsx | Replaced fYaxis.fXmin/fXmax with fMinimum/fMaximum including a constant scaling factor |
| src/JsRoot/components/JsRootGraph1D.tsx | Similar refactoring of histogram properties with a scaling factor applied to fMaximum |
| package.json | Upgraded jsroot dependency version from ^7.8.2 to ^7.9.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request upgrades the jsroot dependency to version 7.9.0 and refactors axis handling in the JsRoot components to use the generalized fMinimum and fMaximum properties with a configurable scaling factor. Key changes include:
- Updating the jsroot version in package.json
- Refactoring axis limits in JsRootGraph1D.tsx, JsRootGraph2D.tsx, and JsRootMultiGraph1D.tsx
- Introducing MAX_SCALING_FACTOR in GraphData.tsx for consistent axis scaling
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated jsroot dependency version |
| src/JsRoot/components/JsRootGraph1D.tsx | Replaced axis-specific properties with fMinimum and fMaximum |
| src/JsRoot/components/JsRootGraph2D.tsx | Refactored axis limit handling with new fMinimum and fMaximum pattern |
| src/JsRoot/components/JsRootMultiGraph1D.tsx | Updated multi-graph axis scaling using MAX_SCALING_FACTOR |
| src/JsRoot/GraphData.tsx | Introduced MAX_SCALING_FACTOR constant for axis scaling consistency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the jsroot dependency to version 7.9.0 and improves axis handling for better visualization by replacing axis-specific properties with generic fMinimum and fMaximum values.
- Upgraded jsroot in package.json
- Updated one-dimensional and two-dimensional graph components to use fMinimum and fMaximum with a scaling constant
- Introduced a MAX_SCALING_FACTOR constant in GraphData for consistent axis scaling
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/JsRoot/components/JsRootMultiGraph1D.tsx | Replaced fYaxis properties with generic fMinimum and fMaximum using MAX_SCALING_FACTOR |
| src/JsRoot/components/JsRootGraph2D.tsx | Updated axis limits handling to use fMinimum and fMaximum |
| src/JsRoot/components/JsRootGraph1D.tsx | Updated axis limits handling to use fMinimum and fMaximum |
| src/JsRoot/GraphData.tsx | Added constant MAX_SCALING_FACTOR for axis scaling |
| package.json | Upgraded jsroot dependency to version ^7.9.0 |
|
Try loading "SOBP" example. The 2D map of XZ looks bad: After switching to LogZ: we see that the data behind is OK: this is what we expect (from https://yaptide.github.io/web_dev/): |
grzanka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the jsroot dependency to version 7.9.0 and refactors the Y-axis scaling logic in graph components for improved visualization.
- Upgraded jsroot version in package.json
- Introduced and centralized the MAX_SCALING_FACTOR constant in GraphData.tsx
- Updated JsRootGraph1D and JsRootMultiGraph1D to use the new scaling factor
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/JsRoot/components/JsRootMultiGraph1D.tsx | Imports and applies MAX_SCALING_FACTOR in Y-axis scaling |
| src/JsRoot/components/JsRootGraph1D.tsx | Applies MAX_SCALING_FACTOR for Y-axis in a single graph |
| src/JsRoot/GraphData.tsx | Added constant MAX_SCALING_FACTOR with accompanying comment |
| package.json | Upgraded jsroot dependency from ^7.8.2 to ^7.9.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the jsroot dependency and refactors the graph components to use a centralized scaling factor constant for improved visualization of Y-axis data.
- Upgraded jsroot from v7.8.2 to v7.9.0 in package.json
- Added and applied MAX_SCALING_FACTOR in both JsRootGraph1D and JsRootMultiGraph1D for consistent Y-axis scaling
- Centralized scaling logic by introducing MAX_SCALING_FACTOR in GraphData.tsx
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/JsRoot/components/JsRootMultiGraph1D.tsx | Updated Y-axis scaling to use MAX_SCALING_FACTOR; replaced fYaxis properties with fMinimum/fMaximum |
| src/JsRoot/components/JsRootGraph1D.tsx | Replaced hardcoded Y-axis calculations with use of MAX_SCALING_FACTOR for improved maintainability |
| src/JsRoot/GraphData.tsx | Added constant MAX_SCALING_FACTOR to centralize scaling logic |
| package.json | Updated jsroot dependency version to ^7.9.0 |
Comments suppressed due to low confidence (2)
src/JsRoot/components/JsRootMultiGraph1D.tsx:53
- Ensure that replacing histogram.fYaxis.fXmin/fXmax with histogram.fMinimum/fMaximum aligns with the jsroot 7.9.0 API. If these properties have changed in behavior, consider adding a comment or reference to the documentation.
histogram.fMinimum = Math.min(...page.pages.flatMap(p => p.data.values));
src/JsRoot/components/JsRootGraph1D.tsx:26
- Confirm that the setting of histogram.fMinimum and histogram.fMaximum (later multiplied by MAX_SCALING_FACTOR) is correct per jsroot 7.9.0. If the API now uses these properties instead of the previous fYaxis fields, a brief inline link to the update notes would be helpful.
histogram.fMinimum = Math.min(...y);
grzanka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM




This pull request includes updates to dependencies and introduces a new scaling factor for Y-axis visualization in graph components. The changes ensure better graph rendering and maintainability of the code.
Dependency Updates:
jsrootdependency inpackage.jsonfrom version^7.8.2to^7.9.0to include the latest features and fixes.Graph Visualization Enhancements:
MAX_SCALING_FACTORinsrc/JsRoot/GraphData.tsxto define a scaling factor for the Y-axis, ensuring the maximum value is slightly larger than the actual maximum for better visualization.JsRootGraph1Dinsrc/JsRoot/components/JsRootGraph1D.tsxto useMAX_SCALING_FACTORfor setting the maximum value of the Y-axis, replacing hardcoded logic.JsRootMultiGraph1Dinsrc/JsRoot/components/JsRootMultiGraph1D.tsxto applyMAX_SCALING_FACTORfor consistent scaling of the Y-axis across multi-graph visualizations.Code Refactoring:
MAX_SCALING_FACTORinJsRootGraph1DandJsRootMultiGraph1Dcomponents to centralize the scaling logic and improve maintainability. [1] [2]