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

Can't set ticks on the yAxis for the Coordinate Grid Chart #228

Closed
boesb opened this issue Jul 26, 2013 · 0 comments
Closed

Can't set ticks on the yAxis for the Coordinate Grid Chart #228

boesb opened this issue Jul 26, 2013 · 0 comments
Labels
Milestone

Comments

@boesb
Copy link

boesb commented Jul 26, 2013

In the prepareYAxis function, the yAxis is hardcoded with the default number of ticks so the number can never be changed.

My solution:

Add new variable:
var _yTicks = DEFAULT_Y_AXIS_TICKS;

Modify prepareYAxis function:
_yAxis = _yAxis.scale(_y).orient("left").ticks(_yTicks);

Add new function:
chart.yTicks = function () {
if (!arguments.length) return _yTicks;
_yTicks = _;
return _chart;
};

Thanks!

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

1 participant