Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Category axis with breaks is rendered incorrectly #6370

larsac07 opened this issue Feb 14, 2017 · 1 comment

Category axis with breaks is rendered incorrectly #6370

larsac07 opened this issue Feb 14, 2017 · 1 comment


Copy link

@larsac07 larsac07 commented Feb 14, 2017

Expected behaviour

In a category axis, ticks and gridLines are supposed to be placed between tick labels, and not at them. They are at least not supposed to be drawn outside the plotArea.

Actual behaviour

Some ticks and gridLines are drawn outside the plotArea when defined in a category axis.

Additionally (and this may very well be another issue, but at least highly related), note that the tick labels which are not affected by the breaks are placed correctly between ticks ('zero', 'one' and 'nine'), while the ticks 'two' and 'eight', which are at the breaks, are placed at their respective ticks. That is, it may very well be that 'eight' is correctly placed between ticks, but 'two' is definitely not placed correctly.

Live demo with steps to reproduce

In the fiddle you can se that commit 4f617c3 caused the gridLines and ticks to be rendered incorrectly, but note that the issue with category label positioning still resides in commits before that.

Affected browser(s)


@TorsteinHonsi TorsteinHonsi added this to the 5.0.8 milestone Feb 15, 2017
Copy link
Contributor Author

@larsac07 larsac07 commented Feb 21, 2017

Update: It seems the problem has always been there with category axes. The only reason it became so apparent after commit 4f617c3, is because the commit removed the clipPath hiding lines drawn outside the plotArea. If you look at the fiddle above, the ticks were always rendered outside the plotArea.

Same example on an X-axis:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants