2 * @fileoverview Test cases for how axis labels are chosen and formatted.
4 * @author dan@dygraphs.com (Dan Vanderkam)
7 import Dygraph from
'../../src/dygraph';
9 describe("multi-csv", function() {
13 function getXLabels() {
14 var x_labels
= document
.getElementsByClassName("dygraph-axis-label-x");
16 for (var i
= 0; i
< x_labels
.length
; i
++) {
17 ary
.push(x_labels
[i
].innerHTML
);
22 it('testOneCSV', function() {
34 var graph
= document
.getElementById("graph");
35 var g
= new Dygraph(graph
, data
, opts
);
37 assert
.deepEqual(['0', '1', '2'], getXLabels());
40 it('testTwoCSV', function() {
52 var graph
= document
.getElementById("graph");
53 var g
= new Dygraph(graph
, data
, opts
);
55 assert
.deepEqual(['0', '1', '2'], getXLabels());
57 g
.updateOptions({file
: data
});
59 assert
.deepEqual(['0', '1', '2'], getXLabels());