Skip to content

Commit

Permalink
[ML] Only adjust the bounds of SMV if annotations are visible (elasti…
Browse files Browse the repository at this point in the history
…c#79210)

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
qn895 and kibanamachine committed Oct 5, 2020
1 parent 67cfa50 commit 2e220e9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ class TimeseriesChartIntl extends Component {

// if annotations are present, we extend yMax to avoid overlap
// between annotation labels, chart lines and anomalies.
if (focusAnnotationData && focusAnnotationData.length > 0) {
if (showAnnotations && focusAnnotationData && focusAnnotationData.length > 0) {
const levels = getAnnotationLevels(focusAnnotationData);
const maxLevel = d3.max(Object.keys(levels).map((key) => levels[key]));
// TODO needs revisiting to be a more robust normalization
Expand Down

0 comments on commit 2e220e9

Please sign in to comment.