Made searching and metric fills work.

This commit is contained in:
Filip Barl
2018-08-09 12:31:12 +02:00
parent b5ee1e690c
commit b05563d9ab
3 changed files with 32 additions and 7 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ const loadScale = scaleLog().domain([0.01, 100]).range([0, 1]);
export function getMetricValue(metric) {
if (!metric) {
return {height: 0, value: null, formattedValue: 'n/a'};
return { height: 0, value: null, formattedValue: 'n/a' };
}
const m = metric.toJS();
const { value } = m;
@@ -35,7 +35,7 @@ export function getMetricValue(metric) {
max = null;
}
let displayedValue = Number(value).toFixed(1);
let displayedValue = Number(value);
if (displayedValue > 0 && (!max || displayedValue < max)) {
const baseline = 0.1;
displayedValue = (valuePercentage * (1 - (baseline * 2))) + baseline;