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

Closed
BenjaminCorey opened this Issue Nov 19, 2012 · 1 comment

Comments

Projects
None yet
2 participants

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

https://github.com/mbostock/d3/blob/master/src/time/scale.js#L101-L131

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);
};
Owner

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: http://bl.ocks.org/4149176

mbostock closed this Jan 23, 2013

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