| 1 | /** |
| 2 | * @fileoverview Test cases for the option "drawGapEdgePoints" |
| 3 | */ |
| 4 | |
| 5 | import Dygraph from '../../src/dygraph'; |
| 6 | import * as utils from '../../src/dygraph-utils'; |
| 7 | |
| 8 | describe("draw-gap-edge-points", function() { |
| 9 | |
| 10 | cleanupAfterEach(); |
| 11 | |
| 12 | it("shouldn't draw any points by default", function() { |
| 13 | var called = false; |
| 14 | var g = new Dygraph(document.getElementById("graph"), |
| 15 | [[0, 0], |
| 16 | [1, 1], |
| 17 | [2, 2], |
| 18 | [3, 3], |
| 19 | [4, 4], |
| 20 | [5, 5]], |
| 21 | {labels: ['a', 'b'], |
| 22 | drawGapEdgePoints: true, |
| 23 | drawPointCallback: function() { called = true; }}); |
| 24 | |
| 25 | assert.isFalse(called); |
| 26 | }); |
| 27 | |
| 28 | it("shouldn't draw any points by default (no axes)", function() { |
| 29 | var called = false; |
| 30 | var g = new Dygraph(document.getElementById("graph"), |
| 31 | [[0, 0], |
| 32 | [1, 1], |
| 33 | [2, 2], |
| 34 | [3, 3], |
| 35 | [4, 4], |
| 36 | [5, 5]], |
| 37 | {labels: ['a', 'b'], |
| 38 | drawGapEdgePoints: true, |
| 39 | drawPointCallback: function() { called = true; }, |
| 40 | axes: { |
| 41 | x: { drawAxis: false }, |
| 42 | y: { drawAxis: false } |
| 43 | }}); |
| 44 | |
| 45 | assert.isFalse(called); |
| 46 | }); |
| 47 | }); |