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

Closed
larsac07 opened this Issue Feb 14, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@larsac07
Contributor

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

http://jsfiddle.net/larsac07/xb42p82g/6/

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)

All

@TorsteinHonsi TorsteinHonsi added this to the 5.0.8 milestone Feb 15, 2017

@larsac07

This comment has been minimized.

Show comment
Hide comment
@larsac07

larsac07 Feb 21, 2017

Contributor

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: http://jsfiddle.net/larsac07/8vdvyjdr/2/

Contributor

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: http://jsfiddle.net/larsac07/8vdvyjdr/2/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment