Commit 90208eb1 authored by Masayuki Tanaka's avatar Masayuki Tanaka Committed by masayuki

Modify tickTextNum for category axis

parent e311a9f3
......@@ -1606,7 +1606,7 @@
}
function categoryAxis () {
var scale = d3.scale.linear(), orient = "bottom", tickMajorSize = 6, tickMinorSize = 6, tickEndSize = 6, tickPadding = 3, tickCentered = false, tickTextNum = 30, tickOffset = 0, categories = []
var scale = d3.scale.linear(), orient = "bottom", tickMajorSize = 6, tickMinorSize = 6, tickEndSize = 6, tickPadding = 3, tickCentered = false, tickTextNum = 10, tickOffset = 0, categories = []
function axisX (selection, x) {
selection.attr("transform", function(d){
return "translate(" + (x(d) + tickOffset) + ",0)"
......@@ -1737,6 +1737,11 @@
tickCentered = x
return axis
}
axis.tickTextNum = function(x) {
if (!arguments.length) return tickTextNum
tickTextNum = x
return axis
}
axis.tickOffset = function() {
return tickOffset
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment