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

x2axis and bar charts do not mix #908

Open
paaland opened this issue Dec 19, 2012 · 2 comments
Open

x2axis and bar charts do not mix #908

paaland opened this issue Dec 19, 2012 · 2 comments
Assignees
Labels
Milestone

Comments

@paaland
Copy link

paaland commented Dec 19, 2012

I'm trying to use the x2axis with a bar chart, but there seems to be a bug that prevents the correct number of ticks to be displayed. See

http://jsfiddle.net/paaland/4RwYX/2/

@dnschnur
Copy link
Member

This is pretty weird; thank you for reporting it, and providing such a clear example.

@ghost ghost assigned dnschnur Dec 19, 2012
@dnschnur
Copy link
Member

This is more complicated than it appears. Since the axis is not tied to any data series, it automatically ranges from -1 to 1. In this context the ticks are correct; 0 (A) appears in the middle of the axis. If you set min: 0, max: 3 in the axis options, then all the ticks appear.

This is probably the wrong behavior - if ticks are provided, one would expect their x-values to influence the min/max - but determining the correct behavior needs more thought.

There's also another problem: since the second axis isn't associated with a bar series, its ticks aren't offset as per the 'align' property, even though the axis has alignTicksWithAxis specified. This is a more straightforward bug, but the fix requires a bit of work.

I'm moving this to the 0.9 milestone, since it will take more time to address, and it is possible to work around the issue once one understands the underlying (confusing and undocumented) behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants