X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=inline;f=tests%2Fx-axis-formatter.html;h=b008ad855001783be11b2522342da3c154ab6721;hb=94ea5744c9541f9c91ee2d150d06024e430c967e;hp=96b3e06205998e0c4b30e81d1ae3ac157f8d50a2;hpb=bf640e568cb4c340010ed9ac60b905a4d93acd53;p=dygraphs.git diff --git a/tests/x-axis-formatter.html b/tests/x-axis-formatter.html index 96b3e06..b008ad8 100644 --- a/tests/x-axis-formatter.html +++ b/tests/x-axis-formatter.html @@ -1,13 +1,17 @@ +
-Original data:
@@ -41,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( @@ -52,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()); + } } + } });