this.attrs_.xTicker = Dygraph.dateTicker;
this.attrs_.xAxisLabelFormatter = Dygraph.dateAxisFormatter;
} else {
- this.attrs_.xValueFormatter = this.attrs_.xValueFormatter;
+ this.attrs_.xValueFormatter = this.attrs_.yValueFormatter;
this.attrs_.xValueParser = function(x) { return parseFloat(x); };
this.attrs_.xTicker = Dygraph.numericTicks;
this.attrs_.xAxisLabelFormatter = this.attrs_.xValueFormatter;
--- /dev/null
+<html>
+ <head>
+ <title>CSV with numeric X series</title>
+ <!--[if IE]>
+ <script type="text/javascript" src="../excanvas.js"></script>
+ <![endif]-->
+ <script type="text/javascript" src="../strftime/strftime-min.js"></script>
+ <script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
+ <script type="text/javascript" src="../dygraph-canvas.js"></script>
+ <script type="text/javascript" src="../dygraph.js"></script>
+ </head>
+ <body>
+ <p>CSV data with a numeric (non-date) X series.</p>
+ <div id="graph"></div>
+ <script type="text/javascript">
+ new Dygraph(
+ document.getElementById("graph"),
+ "X,Y\n" +
+ "1,0\n" +
+ "2,10\n" +
+ "3,0\n" +
+ "4,-10\n" +
+ "5,0\n"
+ );
+ </script>
+ </body>
+</html>