Skip to content

add ability to set number of xAxis ticks#21

Open
djbordelon wants to merge 1 commit into
dk8996:masterfrom
djbordelon:master
Open

add ability to set number of xAxis ticks#21
djbordelon wants to merge 1 commit into
dk8996:masterfrom
djbordelon:master

Conversation

@djbordelon

Copy link
Copy Markdown

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