diff --git a/lib/client/renderer.js b/lib/client/renderer.js index cad746f5cda..03982937b63 100644 --- a/lib/client/renderer.js +++ b/lib/client/renderer.js @@ -451,9 +451,10 @@ function init (client, d3) { if ( treatment.insulin < 1 && !treatment.carbs && enteredBy.indexOf('openaps') > -1) { // don't show the unit of measurement for insulin boluses < 1 without carbs (e.g. oref0 SMB's). Otherwise lot's of small insulin only dosages are often unreadable unit_of_measurement = ''; + // remove leading zeros to avoid overlap with adjacent boluses dosage_units = (dosage_units+"").replace(/^0/,""); } - // remove leading zeros to avoid overlap with adjacent boluses + arc_data[3].element = dosage_units + unit_of_measurement; } @@ -861,7 +862,7 @@ function init (client, d3) { .style('fill', 'white'); // reduce the treatment label font size to make it readable with SMB - var fontBaseSize = (opts.treatments >= 50) ? 40 : 50 - Math.floor((50-opts.treatments)/50 * 10); + var fontBaseSize = (opts.treatments >= 50) ? 40 : 50 - Math.floor((60-opts.treatments)/50 * 10); label.append('text') .style('font-size', fontBaseSize / opts.scale)