Skip to content

Commit

Permalink
fix: account for minValue for Y-axis ticks step
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarl committed Dec 10, 2018
1 parent 3fb4810 commit 4d2f240
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/PrometheusGraph/_AxesGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function getValueTicks(metricUnits, minValue, maxValue) {
: range(50).map(p => Math.pow(2, p));
/* eslint-enable no-restricted-properties */

const step = find(steps, s => maxValue / s < 4);
const step = find(steps, s => (maxValue - minValue) / s < 4);

// lodash `range()` doesn't include the end value in the returned array so we
// add 1e-6 to move maxValue within the range
Expand Down

0 comments on commit 4d2f240

Please sign in to comment.