Skip to content
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

Merged
merged 8 commits into from
Mar 4, 2021
2 changes: 1 addition & 1 deletion src/plugins/vis_type_xy/public/utils/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Copy link
Member

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)

Copy link
Contributor Author

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?

Copy link
Contributor Author

@nickofthyme nickofthyme Mar 2, 2021

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.


if (bounds) {
return {
Expand Down