terezka / elm-charts

Create SVG charts in Elm.
https://www.elm-charts.org
BSD 3-Clause "New" or "Revised" License
736 stars 67 forks source link

`yTick` default X position should be `CA.zero` but is instead `CA.middle` #91

Closed jhbrown-veradept closed 3 years ago

jhbrown-veradept commented 3 years ago

The default X position used by yTick puts the tick in the middle of the range. From the definition of yTick at https://github.com/terezka/elm-charts/blob/master/src/Chart.elm#L1305

          { x = CA.middle p.x
          , y = CA.zero p.y

I believe CA.middle and CA.zero should be switched -- as it is, they are identical to the corresponding lines in xTick

terezka commented 3 years ago

You are right! Thank you for noticing!