Skip to content

Conversation

@walterra
Copy link
Contributor

Fixes #18023.

  1. Increases the top margin to 5 and the right margin to 1 to avoid cutting off the chart because overflow is hidden for the directives mlEventRateChart and mlMultiMetricJobChart. The top margin gives enough room to avoid cutting off y-axis labels. The right margin is a tweak to not cut off the gray border by 1 pixel to the right.

Before and after:

  1. Fixes how the domain for mlEventRateChart is calculated. The domain gets now extended by 1 barsInterval, otherwise the last bar will start at the end of vizWidth and overflow the chart (the overflow is hidden so the visible chart missed one bar).

The following screenshot demonstrates the issue by temporarily setting overflow: visible:

image

The fixed version adjusts the domain and the last bar doesn't overflow the chart anymore:

image

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one minor typo!

swimlaneXScale.domain(d3.extent(finerData, d => d.date));


// Extent the time range/domain at the end by 1 barsInterval,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be 'Extend' rather than 'Extent' !

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticmachine
Copy link
Contributor

💔 Build Failed

@walterra
Copy link
Contributor Author

jenkins retest this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@walterra walterra merged commit d2e0aed into elastic:master Jun 11, 2018
walterra added a commit to walterra/kibana that referenced this pull request Jun 11, 2018
1. Increases the top margin to 5 and the right margin to 1 to avoid cutting off the chart because overflow is hidden for the directives mlEventRateChart and mlMultiMetricJobChart. The top margin gives enough room to avoid cutting off y-axis labels. The right margin is a tweak to not cut off the gray border by 1 pixel to the right.
2. Fixes how the domain for mlEventRateChart is calculated. The domain gets now extended by 1 barsInterval, otherwise the last bar will start at the end of vizWidth and overflow the chart (the overflow is hidden so the visible chart missed one bar).
walterra added a commit that referenced this pull request Jun 12, 2018
1. Increases the top margin to 5 and the right margin to 1 to avoid cutting off the chart because overflow is hidden for the directives mlEventRateChart and mlMultiMetricJobChart. The top margin gives enough room to avoid cutting off y-axis labels. The right margin is a tweak to not cut off the gray border by 1 pixel to the right.
2. Fixes how the domain for mlEventRateChart is calculated. The domain gets now extended by 1 barsInterval, otherwise the last bar will start at the end of vizWidth and overflow the chart (the overflow is hidden so the visible chart missed one bar).
@walterra walterra deleted the ml-chart-axis-overflow-fix branch June 12, 2018 13:09
maryia-lapata pushed a commit to maryia-lapata/kibana that referenced this pull request Jun 25, 2018
1. Increases the top margin to 5 and the right margin to 1 to avoid cutting off the chart because overflow is hidden for the directives mlEventRateChart and mlMultiMetricJobChart. The top margin gives enough room to avoid cutting off y-axis labels. The right margin is a tweak to not cut off the gray border by 1 pixel to the right.
2. Fixes how the domain for mlEventRateChart is calculated. The domain gets now extended by 1 barsInterval, otherwise the last bar will start at the end of vizWidth and overflow the chart (the overflow is hidden so the visible chart missed one bar).
walterra added a commit that referenced this pull request Jul 11, 2018
…20618)

Fixes a regression introduced by #19794. This PR added a 5px top margin to the affected charts. The hard coded bottom margin of the progress bars wasn't adjusted accordingly so the progress bars ended up being hidden behind the actual chart. This PR fixes the problem by taking the chart's top margin into account for progressBarMarginBottom.
walterra added a commit to walterra/kibana that referenced this pull request Jul 11, 2018
…lastic#20618)

Fixes a regression introduced by elastic#19794. This PR added a 5px top margin to the affected charts. The hard coded bottom margin of the progress bars wasn't adjusted accordingly so the progress bars ended up being hidden behind the actual chart. This PR fixes the problem by taking the chart's top margin into account for progressBarMarginBottom.
walterra added a commit that referenced this pull request Jul 12, 2018
…20618) (#20670)

Fixes a regression introduced by #19794. This PR added a 5px top margin to the affected charts. The hard coded bottom margin of the progress bars wasn't adjusted accordingly so the progress bars ended up being hidden behind the actual chart. This PR fixes the problem by taking the chart's top margin into account for progressBarMarginBottom.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ML] Cut off y-axis labelling on Multi-metric job creation from a saved search.

4 participants