Self hosted FLOSS fitness/workout, nutrition and weight tracker
Reduce the min value used for the x-axis on workout log chart
Roland Geider492c935e1ef2
diff --git a/manager/static/js/workout-manager.js b/manager/static/js/workout-manager.jsindex 4bb21c459..da1b8410d 100644--- a/manager/static/js/workout-manager.js+++ b/manager/static/js/workout-manager.js@@ -616,8 +616,10 @@ function weight_log_chart(data, div_id, reps_i18n)x.domain(d3.extent(data, function(d) { return d.date; }));+ // Add 1 kg of "breathing room" on the min value, so the diagrams don't+ // too flaty.domain([- d3.min(reps, function(c) { return d3.min(c.values, function(v) { return v.weight; }); }),+ d3.min(reps, function(c) { return d3.min(c.values, function(v) { return v.weight - 1; }); }),d3.max(reps, function(c) { return d3.max(c.values, function(v) { return v.weight; }); })]);