Fix UserJobEfficiencyComponenet and other dashboard errors#2129
Open
aestoltm wants to merge 5 commits intoubccr:mainfrom
Open
Fix UserJobEfficiencyComponenet and other dashboard errors#2129aestoltm wants to merge 5 commits intoubccr:mainfrom
UserJobEfficiencyComponenet and other dashboard errors#2129aestoltm wants to merge 5 commits intoubccr:mainfrom
Conversation
jpwhite4
requested changes
Apr 15, 2026
| */ | ||
| function adjustSubtitle(layout, subtitleIndex, legendTopCenter, firstRender) { | ||
| let prevLineCount = layout.annotations[1].text.match(/<br \/>/g); | ||
| let prevLineCount = layout.annotations[`${subtitleIndex}`].text.match(/<br \/>/g); |
Member
There was a problem hiding this comment.
how come you are converting the subtitleIndex variable to a string to do the array lookup? What is the difference between yyour code and layout.annotations[subtitleIndex]
| update['legend.y'] -= 0.025; | ||
| update['margin.t'] += chartDiv._fullLayout.legend._height + subtitleHeight; | ||
|
|
||
| // Observed inconsistency with margin when subtitle is one line long. Unsure of the cause. |
Member
There was a problem hiding this comment.
This comment is not particularly useful - what is the inconsistency? how does this relate the code that the comment is next to?
|
|
||
| // Observed inconsistency with margin when subtitle is one line long. Unsure of the cause. | ||
| if (lineBreakCount > 0) { | ||
| if (firstRender) { |
Member
There was a problem hiding this comment.
please can you explain the logic here. It seems like on the first render you ignore the subtitle settings. How come?
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.
Description
@aaronweeden pointed out an error with the
UserJobEfficiencyComponenetdashboard component. The issue was we assumed that plots always have anaxisproperty when some custom plots do not. While exploring the issue I also found various issues with plots that do not have a subtitle.Motivation and Context
UserJobEfficiencyComponenetdashboard component did not work at all. Other plots had resizing errors (if no subtitle)Tests performed
Tested on my dev port
Checklist: