-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Explain Log Rate Spikes: Histogram fixes. #139933
Conversation
// temporary fix to reduce horizontal chart margin until fixed in Elastic Charts itself | ||
labelFormat={() => ''} | ||
timeAxisLayerCount={useLegacyTimeAxis ? 0 : 2} | ||
style={useLegacyTimeAxis ? {} : MULTILAYER_TIME_AXIS_STYLE} |
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 workaround works only with the multilayer time axis and not with the legacy.
So my suggestion is to remove completely the legacyTimeAxis configuration and use only the multilayer one.
If you prefer keep that, you instead should change the labelFormat as:
labelFormat={useLegacyTimeAxis ? undefined : () => ''}
you can double check how it will work by setting the legacy time axis in the Advanced setting
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.
Thanks for the hint! I'll stick with useLegacyTimeAxis
for now so the chart behavior is the same as in Discover.
Pinging @elastic/ml-ui (:ml) |
@elasticmachine merge upstream |
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.
Not related to the changes here, as happens before too, but when comparing to the doc count in Discover I noticed that the behavior for the first and last buckets is different here, where you see empty buckets, compared to populated buckets in the Discover chart.
Compared to Discover (same time range):
@peteharverson Thanks for pointing out the empty buckets, fixed them as part of this PR in 2b81837. |
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.
Latest change to fix end buckets works for me. LGTM
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 ⚡
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @walterra |
Fixes histogram styling, some alignments with discover chart. - Switch BarSeries to HistogramBarSeries. - Fix too generic IDs. - Align y axis ticks settings with Discover chart. - Fixes horizontal margins. - Fixes x domain to avoid empty buckets at start and end of histogram. (cherry picked from commit 1ff209a)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Fixes histogram styling, some alignments with discover chart. - Switch BarSeries to HistogramBarSeries. - Fix too generic IDs. - Align y axis ticks settings with Discover chart. - Fixes horizontal margins. - Fixes x domain to avoid empty buckets at start and end of histogram. (cherry picked from commit 1ff209a) Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Summary
Fixes histogram styling, some alignments with discover chart.
BarSeries
toHistogramBarSeries
.Previous:
After:
Checklist