Allow override of d3_time_scaleLocalFormat and d3_time_scaleLocalMethods via the public interface #910

BenjaminCorey opened this Issue Nov 19, 2012 · 1 comment


None yet
2 participants

Override the default formatting for the auto time-scale ticks.

Proposed API:

d3.time.scale = function(options) {
  var methods = options.methods || d3_time_scaleLocalMethods,
      format  = options.format  || d3_time_scaleLocalFormat;

  return d3_time_scale(d3.scale.linear(), methods, format);

mbostock commented Jan 23, 2013

If you want a custom multi-scale time format, I recommend doing that outside of the time scale, as in this example:

mbostock closed this Jan 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment