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

add ability to set number of xAxis ticks #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add ability to set number of xAxis ticks #21

wants to merge 1 commit into from

Conversation

dojobo
Copy link

@dojobo dojobo commented Aug 26, 2016

Like gantt.tickFormat(), this change wraps d3.svg.axis.ticks() so that the user can set the ticks they want to see on the x axis.

  • a single integer will approximate that number of ticks, e.g. d3.gantt()....ticks(12) will place approximately 12 ticks (the default behavior of d3.svg.axis is .ticks(10)).
  • or, a d3.time interval can be used, e.g., d3.gantt()....ticks(d3.time.month, 6) will place a tick for every six months.
  • calling gantt().ticks() with no arguments will return the current ticks setting.

.ticks() is an optional call, so, as with d3.svg.axis, this change should not effect existing implementations that do not use .ticks().

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

Successfully merging this pull request may close these issues.

1 participant