X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Fx-axis-formatter.html;fp=tests%2Fx-axis-formatter.html;h=b008ad855001783be11b2522342da3c154ab6721;hb=48e614acf3084b9836803f8b014bf0e65f1ca119;hp=b370a8637f92543471ebde1a306629ecbf00f197;hpb=f35016e8b97d39691777a8ad850bfa314e7e223a;p=dygraphs.git diff --git a/tests/x-axis-formatter.html b/tests/x-axis-formatter.html index b370a86..b008ad8 100644 --- a/tests/x-axis-formatter.html +++ b/tests/x-axis-formatter.html @@ -45,10 +45,13 @@ document.getElementById("offby2"), HourlyData(), { - xAxisLabelFormatter: - function(d, gran) { - return Dygraph.dateAxisFormatter(new Date(d.getTime() + 7200*1000), gran); + axes: { + x: { + axisLabelFormatter: function(d, gran) { + return Dygraph.dateAxisFormatter(new Date(d.getTime() + 7200*1000), gran); + } } + } }); new Dygraph( @@ -56,12 +59,15 @@ HourlyData(), { xAxisLabelWidth: 70, - xAxisLabelFormatter: - function(d, gran) { - return Dygraph.zeropad(d.getHours()) + ":" - + Dygraph.zeropad(d.getMinutes()) + ":" - + Dygraph.zeropad(d.getSeconds()); + axes: { + x: { + axisLabelFormatter: function(d, gran) { + return Dygraph.zeropad(d.getHours()) + ":" + + Dygraph.zeropad(d.getMinutes()) + ":" + + Dygraph.zeropad(d.getSeconds()); + } } + } });