Skip to content

Commit 6aca701

Browse files
committed
[ML] Extend yMax by factor of difference of yMax, yMin
1 parent 513138b commit 6aca701

File tree

1 file changed

+1
-1
lines changed
  • x-pack/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart

1 file changed

+1
-1
lines changed

x-pack/plugins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ class TimeseriesChartIntl extends Component {
689689
const levels = getAnnotationLevels(focusAnnotationData);
690690
const maxLevel = d3.max(Object.keys(levels).map((key) => levels[key]));
691691
// TODO needs revisiting to be a more robust normalization
692-
yMax = yMax * (1 + (maxLevel + 1) / 5);
692+
yMax += Math.abs(yMax - yMin) * ((maxLevel + 1) / 5);
693693
}
694694
this.focusYScale.domain([yMin, yMax]);
695695
} else {

0 commit comments

Comments
 (0)