Skip to content

Commit

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
qn895 and kibanamachine authored Oct 5, 2020
1 parent 6432995 commit 6dc51ef
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 6dc51ef

Please sign in to comment.