From c51ff57c33c93c95b137444e4e9042411c01d5f3 Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Tue, 26 Jun 2018 21:46:16 +0200 Subject: [PATCH] Remove first and last tick on y axis so it looks nicer --- components/chart.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/chart.js b/components/chart.js index dfbb63d..be18682 100644 --- a/components/chart.js +++ b/components/chart.js @@ -196,11 +196,12 @@ function makeYAxis() { const tickPositions = [] const labels = [] - for (let i = 0; i < numberOfTicks; i++) { + // for style reasons, we don't want the first and last tick + for (let i = 1; i < numberOfTicks - 1; i++) { const y = tickDistance * i const style = styles.yAxisLabel // this eyeballing is sadly necessary because RN does not - // support percentag values for transforms, which we'd need + // support percentage values for transforms, which we'd need // to reliably place the label vertically centered to the grid style.top = y - 8 labels.push(