Closed inodb closed 8 years ago
I've solved it by adding an extra option to tickFormat:
var xAxis = d3.svg.axis()
.scale(xScale)
.orient(orient)
.tickFormat(tickFormat.format)
.tickSize(tickFormat.tickSize);
if (tickFormat.tickValues !== null) {
xAxis.tickValues(tickFormat.tickValues);
} else {
xAxis.ticks(tickFormat.numTicks || tickFormat.tickTime, tickFormat.tickInterval);
}
Want me to send a PR?
Yeah a PR would be great, thanks :)
I'd like to use tickValues (https://github.com/mbostock/d3/wiki/SVG-Axes#tickValues) to set specific axis values. Can you recommend a way how to do that?