Zero line color / axis gridLines config issue

image

Is this intended? An extra grid line is drawn over the Y-axis zero grid line in whatever color I pick for the X-axis grid lines (red, in my case). If it was intended, shouldn’t it take the color of Y-axis grid lines (yellow)? Is the zero line color property unintentionally swapped between X-axis and Y-axis? Also, why doesn’t this happen with the X-axis zero grid line?

I might have an answer for the last question, I think it actually happens with the X-axis zero grid line as well, but it’s not seen or noticed because the extra grid line is drawn below the actual zero grid line (has less z-index). If you debug this block of code, you will figure out that X-axis grid lines are drawn from highest to lowest (i.e. zero line is the last line drawn), however Y-axis grid lines are the other way around (from lowest to highest).

Here’s a live demonstration of the bug: http://codepen.io/anon/pen/bwAqzN?editors=0010

Author: Fantashit

1 thought on “Zero line color / axis gridLines config issue

  1. @KHKKhalid this is the border change your yAxis config to the following to fix this

    yAxes: [{
      gridLines: {
        drawBorder: false
      }
    }]

Comments are closed.