-
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
[XY Charts] fix partial histogram endzones annotations #93091
Conversation
@flash1293 Do you know if anything changed between I'm pretty sure this was working as of #78154. It looks like
In any case, I think this is a correct fix. |
@@ -21,7 +21,7 @@ export const getXDomain = (params: Aspect['params']): DomainRange => { | |||
const minInterval = (params as DateHistogramParams | HistogramParams)?.interval ?? undefined; | |||
|
|||
if ((params as DateHistogramParams).date) { | |||
const bounds = getTimefilter().getActiveBounds(); | |||
const bounds = getTimefilter().getBounds(); |
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.
@nickofthyme that was changed to use getActiveBounds
due to the following:
#89822 (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.
Oh, so any idea why this would return undefined
when a time range is active?
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.
Ok I manually enabled the time filter for date histogram charts. I'm not sure why this is not already happening automatically. But I see timelion is doing this and I modeled the renderer changes after timelion. See https://github.com/elastic/kibana/pull/93091/files
Ok I reverted the code to use xAgg.buckets.getBounds
which knows about the enablement of the time filter and is how vislib
handles getting the time bounds. Both the time-based and non-time-based data seem to be working fine.
jenkins retest this please |
Pinging @elastic/kibana-app (Team:KibanaApp) |
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.
@flash1293 that's a good point, I checked the vislib functionality and it doesn't appear to render the endzone either. We could just use the bounds of the data instead of the |
@elasticmachine merge upstream |
@flash1293 I set the bounds to the data domain in the example above. The endzone logic always annotated the full right side and never the left. Even so, I think the wording on the prompt in this case would be strange, cuz there's no I think we revisit this at a later time. |
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.
Makes sense to me, thanks for checking! LGTM
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* master: (107 commits) [Logs UI] Fix log stream data fetching (elastic#93201) [App Search] Added relevance tuning search preview (elastic#93054) [Canvas] Fix reports embeddables (elastic#93482) [ILM] Added new functional test in ILM for creating a new policy (elastic#92936) Remove direct dependency on statehood package (elastic#93592) [Maps] Track tile loading status (elastic#91585) [Discover][Doc] Improve main documentation (elastic#91854) [Upgrade Assistant] Disable UA and add prompt (elastic#92834) [Snapshot Restore] Remove cloud validation for slm policy (elastic#93609) [Maps] Support GeometryCollections in GeoJson upload (elastic#93507) [XY Charts] fix partial histogram endzones annotations (elastic#93091) [Core] Simplify context typings (elastic#93579) [Alerting] Improving health status check (elastic#93282) [Discover] Restore context documentation (elastic#90784) [core-docs] Edits core-intro section for the new docs system (elastic#93540) add missed codeowners (elastic#89714) fetch node labels via script execution (elastic#93225) [Security Solution] Adds getMockTheme function (elastic#92840) Sort dependencies in package.json correctly (elastic#93590) [Bug] missing timepicker:quickRanges migration (elastic#93409) ...
Summary
Fixes #92809, #93117
Partial buckets were not being rendered on the xy charts due to the
TimefilterContract.getActiveBounds
method returningundefined
. Changing this call to use thegetBounds
method instead, solves the issue.Screen.Recording.2021-03-01.at.01.11.38.PM.mp4
Checklist