Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added formatter for daily time.

  • Loading branch information...
commit e3fde7eee29a526f65962146610d1e979bda91bc 1 parent 136763a
@cesutherland cesutherland authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 js/10000hours.js
View
10 js/10000hours.js
@@ -116,7 +116,11 @@ ten.Vis.config = {
},
xaxis : {
noTicks: 5,
- showLabels : true
+ showLabels : true,
+ tickFormatter : function (n) {
+ var tickDate = (new Date(Date.parse(this.dates[n])));
+ return tickDate.getMonth()+'/'+tickDate.getDate()+'/'+tickDate.getFullYear();
+ }
},
handles : { show : true },
selection : { mode : 'x'},
@@ -178,6 +182,10 @@ function bindFormattersToData (config, data) {
config.totals.flotr.mouse.trackFormatter,
data
);
+ config.totals.flotr.xaxis.tickFormatter = _.bind(
+ config.totals.flotr.xaxis.tickFormatter,
+ data
+ );
config.summary.flotr.xaxis.tickFormatter = _.bind(
config.summary.flotr.xaxis.tickFormatter,
data
Please sign in to comment.
Something went wrong with that request. Please try again.