2 * @fileoverview Test cases for how axis labels are chosen and formatted.
4 * @author dan@dygraphs.com (Dan Vanderkam)
6 describe("multi-csv", function() {
8 beforeEach(function() {
9 document
.body
.innerHTML
= "<div id='graph'></div>";
12 afterEach(function() {
15 function getXLabels() {
16 var x_labels
= document
.getElementsByClassName("dygraph-axis-label-x");
18 for (var i
= 0; i
< x_labels
.length
; i
++) {
19 ary
.push(x_labels
[i
].innerHTML
);
24 it('testOneCSV', function() {
36 var graph
= document
.getElementById("graph");
37 var g
= new Dygraph(graph
, data
, opts
);
39 assert
.deepEqual(['0', '1', '2'], getXLabels());
42 it('testTwoCSV', function() {
54 var graph
= document
.getElementById("graph");
55 var g
= new Dygraph(graph
, data
, opts
);
57 assert
.deepEqual(['0', '1', '2'], getXLabels());
59 g
.updateOptions({file
: data
});
61 assert
.deepEqual(['0', '1', '2'], getXLabels());