-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] Fix Single Metric Viewer chart failing to load if no points during a calendar event #128808
Conversation
Pinging @elastic/ml-ui (:ml) |
Ideally we should be adding points for the calendar events to the charts - adding points, with the usual rectangular scheduled event marker, at chart aggregation interval during the time span of the calendar event, with y-axis values at |
if (itemTime > time) { | ||
const item = chartData[i]; | ||
const previousItem = chartData[i - 1]; | ||
|
||
const diff1 = Math.abs(time - previousItem.date.getTime()); | ||
const diff1 = Math.abs(time - previousItem?.date?.getTime()); |
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.
This diff1
will be NaN
if previousItem is undefined - is that intended?
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.
This is fine as it's only used for a boolean check
💔 Build FailedFailed CI StepsMetrics [docs]Async chunks
Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @qn895 |
Closing in favor of #130000. |
Summary
This PR fixes #128462 where Single Metric Viewer chart fails to load if no points during a calendar event.
Before
After
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers