- * Verify that very large Y ranges don't break things.
- */
-RangeTestCase.prototype.testHugeRange = function() {
- var g = new Dygraph("graph", [[0, -1e120], [1, 1e230]], { includeZero : true });
- assertEqualsDelta(1, -1e229 / g.yAxisRange(0)[0], 0.001);
- assertEqualsDelta(1, 1.1e230 / g.yAxisRange(0)[1], 0.001);
-}
+ * Verify drawAxesAtZero and includeZero.
+ */
+it('testPaddingYAtZero', function() {
+ var g = createGraph({
+ includeZero: true,
+ xRangePad: 42,
+ yRangePad: 30,
+ drawAxesAtZero: true,
+ }, [
+ [-10, 10],
+ [10, 20],
+ [30, 50]
+ ], [-14, 34], [-5, 55]);
+});
+
+/**
+ * Verify logscale, compat mode.
+ */
+it('testLogscaleCompat', function() {
+ var g = createGraph({
+ logscale: true
+ },
+ [[-10, 10], [10, 10], [30, 1000]],
+ [-10, 30], [10, 1099]);
+});
+
+/**
+ * Verify logscale, new mode.
+ */
+it('testLogscalePad', function() {
+ var g = createGraph({
+ logscale: true,
+ yRangePad: 30
+ },
+ [[-10, 10], [10, 10], [30, 1000]],
+ [-10, 30], [5.623, 1778.279]);
+});
+
+/**
+ * Verify scrolling all-zero region, new-style.
+ */
+it('testZeroScroll2', function() {
+ var g = new Dygraph(
+ document.getElementById("graph"),
+ "X,Y\n" +
+ "1,0\n" +
+ "8,0\n" +
+ "9,0.1\n",
+ {
+ animatedZooms: true,
+ drawAxesAtZero: true,
+ xRangePad: 4,
+ yRangePad: 4
+ });
+});
+
+});