Skip to content

Commit

Permalink
Add an example for labels below SECONDLY granularity
Browse files Browse the repository at this point in the history
  • Loading branch information
lukevmorris committed Dec 7, 2017
1 parent 3fc342f commit 5f712e8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/dygraph-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,7 @@ export function dateAxisLabelFormatter(date, granularity, opts) {
// e.g. '21 Jan' (%d%b)
return zeropad(day) + ' ' + SHORT_MONTH_NAMES_[month];
} else if (granularity < DygraphTickers.Granularity.SECONDLY) {
// e.g. 40.310 (meaning 40 seconds and 310 milliseconds)
var str = "" + millis;
return zeropad(secs) + "." + ('000'+str).substring(str.length);
} else if (granularity > DygraphTickers.Granularity.MINUTELY) {
Expand Down

0 comments on commit 5f712e8

Please sign in to comment.